mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-25 10:29:14 -04:00
Refactor to use validator class
Using a separate validator class to check for appropriate characters in a text message sender means that we’re not doing this validation in a different way from the other checks (length and required). So the code is cleaner.
This commit is contained in:
@@ -810,7 +810,8 @@ def test_incorrect_letter_contact_block_input(
|
||||
|
||||
@pytest.mark.parametrize('sms_sender_input, expected_error', [
|
||||
('', 'Can’t be empty'),
|
||||
('abcdefghijkhgkg', 'Enter 11 characters or fewer')
|
||||
('abcdefghijkhgkg', 'Enter 11 characters or fewer'),
|
||||
(' ¯\_(ツ)_/¯ ', 'Use letters and numbers only'),
|
||||
])
|
||||
def test_incorrect_sms_sender_input(
|
||||
sms_sender_input,
|
||||
|
||||
Reference in New Issue
Block a user