Add missing test cases for precompiled validation messages

This commit is contained in:
Pea Tyczynska
2020-04-02 13:39:40 +01:00
parent 0a7fa1f799
commit 86ab0a6a0f
2 changed files with 25 additions and 1 deletions

View File

@@ -651,7 +651,7 @@ LETTER_VALIDATION_MESSAGES = {
),
},
'not-a-real-uk-postcode': {
'title': 'Theres a problem with the address on this letter',
'title': 'Theres a problem with the address for this letter',
'detail': (
'The last line of the address must be a real UK postcode.'
),

View File

@@ -483,6 +483,30 @@ def test_get_letter_validation_error_for_unknown_error():
'Save a new copy of your file and try again.'
),
),
(
'address-is-empty',
None,
'The address block is empty',
(
'You need to add a recipient address.'
'Files must meet our letter specification.'
),
(
'Validation failed because the address block is empty.'
'Files must meet our letter specification.'
),
),
(
'not-a-real-uk-postcode',
None,
'Theres a problem with the address for this letter',
(
'The last line of the address must be a real UK postcode.'
),
(
'Validation failed because the last line of the address is not a real UK postcode.'
),
),
])
def test_get_letter_validation_error_for_known_errors(
client_request,