Apply sender to template when adding

If you’ve come from a template to add a new letter sender then it’s
because you want those words on that template. This commit adds the
extra API call to make that happen.
This commit is contained in:
Chris Hill-Scott
2019-07-08 11:20:28 +01:00
parent 90f56353ab
commit 7fef51aa6a
3 changed files with 23 additions and 4 deletions

View File

@@ -2168,6 +2168,7 @@ def test_add_letter_contact_when_coming_from_template(
mock_add_letter_contact,
fake_uuid,
mock_get_service_letter_template,
mock_update_service_template_sender,
):
page = client_request.get(
'main.service_add_letter_contact',
@@ -2201,6 +2202,11 @@ def test_add_letter_contact_when_coming_from_template(
contact_block="1 Example Street",
is_default=True,
)
mock_update_service_template_sender.assert_called_once_with(
SERVICE_ONE_ID,
fake_uuid,
'1234',
)
@pytest.mark.parametrize('fixture, data, api_default_args', [