mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Merge pull request #2055 from alphagov/reply-to-anyone
allow non-gov reply to email addresses
This commit is contained in:
@@ -579,7 +579,7 @@ class ProviderForm(StripWhitespaceForm):
|
|||||||
|
|
||||||
|
|
||||||
class ServiceReplyToEmailForm(StripWhitespaceForm):
|
class ServiceReplyToEmailForm(StripWhitespaceForm):
|
||||||
email_address = email_address(label='Email reply to address')
|
email_address = email_address(label='Email reply to address', gov_user=False)
|
||||||
is_default = BooleanField("Make this email address the default")
|
is_default = BooleanField("Make this email address the default")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -891,7 +891,6 @@ def test_no_senders_message_shows(
|
|||||||
@pytest.mark.parametrize('reply_to_input, expected_error', [
|
@pytest.mark.parametrize('reply_to_input, expected_error', [
|
||||||
('', 'Can’t be empty'),
|
('', 'Can’t be empty'),
|
||||||
('testtest', 'Enter a valid email address'),
|
('testtest', 'Enter a valid email address'),
|
||||||
('test@hello.com', 'Enter a government email address. If you think you should have access contact us')
|
|
||||||
])
|
])
|
||||||
def test_incorrect_reply_to_email_address_input(
|
def test_incorrect_reply_to_email_address_input(
|
||||||
reply_to_input,
|
reply_to_input,
|
||||||
@@ -977,7 +976,7 @@ def test_add_reply_to_email_address(
|
|||||||
mock_add_reply_to_email_address
|
mock_add_reply_to_email_address
|
||||||
):
|
):
|
||||||
fixture(mocker)
|
fixture(mocker)
|
||||||
data['email_address'] = "test@example.gov.uk"
|
data['email_address'] = "test@example.com"
|
||||||
client_request.post(
|
client_request.post(
|
||||||
'main.service_add_email_reply_to',
|
'main.service_add_email_reply_to',
|
||||||
service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
@@ -986,7 +985,7 @@ def test_add_reply_to_email_address(
|
|||||||
|
|
||||||
mock_add_reply_to_email_address.assert_called_once_with(
|
mock_add_reply_to_email_address.assert_called_once_with(
|
||||||
SERVICE_ONE_ID,
|
SERVICE_ONE_ID,
|
||||||
email_address="test@example.gov.uk",
|
email_address="test@example.com",
|
||||||
is_default=api_default_args
|
is_default=api_default_args
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user