Fix logic for showing and hiding checkbox

The ‘make this default’ checkbox should be shown, except when:
- the user is adding their first email reply to address (because the
  first one has to be the default)
- they’re editing the existing default (because they can’t change it
  to be not default)
This commit is contained in:
Chris Hill-Scott
2019-06-05 16:32:08 +01:00
parent d9df3171a0
commit 944a7d302c
3 changed files with 19 additions and 4 deletions

View File

@@ -2040,7 +2040,16 @@ def test_add_reply_to_email_address_sends_test_notification(
])
@freeze_time("2018-06-01 11:11:00.061258")
def test_service_verify_reply_to_address(
mocker, client_request, fake_uuid, status, expected_failure, expected_success, is_default, replace, expected_header
mocker,
client_request,
fake_uuid,
get_non_default_reply_to_email_address,
status,
expected_failure,
expected_success,
is_default,
replace,
expected_header
):
notification = {
"id": fake_uuid,