mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Let whitelist and user have int. phone numbers
On the frontend, we’re letting users register with international phone numbers. So we shouldn’t block users from doing this on the API side. Same thing for the whitelist, where we’re also allowing international phone numbers now.
This commit is contained in:
@@ -24,14 +24,15 @@ def test_get_whitelist_returns_data(client, sample_service_whitelist):
|
||||
def test_get_whitelist_separates_emails_and_phones(client, sample_service):
|
||||
dao_add_and_commit_whitelisted_contacts([
|
||||
ServiceWhitelist.from_string(sample_service.id, EMAIL_TYPE, 'service@example.com'),
|
||||
ServiceWhitelist.from_string(sample_service.id, MOBILE_TYPE, '07123456789')
|
||||
ServiceWhitelist.from_string(sample_service.id, MOBILE_TYPE, '07123456789'),
|
||||
ServiceWhitelist.from_string(sample_service.id, MOBILE_TYPE, '+1800-555-555'),
|
||||
])
|
||||
|
||||
response = client.get('service/{}/whitelist'.format(sample_service.id), headers=[create_authorization_header()])
|
||||
assert response.status_code == 200
|
||||
assert json.loads(response.get_data(as_text=True)) == {
|
||||
'email_addresses': ['service@example.com'],
|
||||
'phone_numbers': ['07123456789']
|
||||
'phone_numbers': ['+1800-555-555', '07123456789']
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user