mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Add missing test cases for precompiled validation messages
This commit is contained in:
@@ -651,7 +651,7 @@ LETTER_VALIDATION_MESSAGES = {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
'not-a-real-uk-postcode': {
|
'not-a-real-uk-postcode': {
|
||||||
'title': 'There’s a problem with the address on this letter',
|
'title': 'There’s a problem with the address for this letter',
|
||||||
'detail': (
|
'detail': (
|
||||||
'The last line of the address must be a real UK postcode.'
|
'The last line of the address must be a real UK postcode.'
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -483,6 +483,30 @@ def test_get_letter_validation_error_for_unknown_error():
|
|||||||
'Save a new copy of your file and try again.'
|
'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,
|
||||||
|
'There’s 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(
|
def test_get_letter_validation_error_for_known_errors(
|
||||||
client_request,
|
client_request,
|
||||||
|
|||||||
Reference in New Issue
Block a user