Merge pull request #2293 from alphagov/choose_postage_for_precompiled

Choose postage on POST request for precompiled letters
This commit is contained in:
Pea (Malgorzata Tyczynska)
2019-01-16 14:13:26 +00:00
committed by GitHub
10 changed files with 105 additions and 48 deletions

View File

@@ -90,6 +90,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_sms(
persist_mock.assert_called_once_with(
template_id=template.id,
template_version=template.version,
template_postage=None,
recipient=post_data['to'],
service=template.service,
personalisation={'name': 'foo'},
@@ -127,6 +128,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_email(
persist_mock.assert_called_once_with(
template_id=template.id,
template_version=template.version,
template_postage=None,
recipient=post_data['to'],
service=template.service,
personalisation={'name': 'foo'},
@@ -153,6 +155,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_letter(
template = create_template(
service=service,
template_type=LETTER_TYPE,
postage='first',
subject="Test subject",
content="Hello (( Name))\nYour thing is due soon",
)
@@ -174,6 +177,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_letter(
persist_mock.assert_called_once_with(
template_id=template.id,
template_version=template.version,
template_postage='first',
recipient=post_data['to'],
service=template.service,
personalisation=post_data['personalisation'],