add tests for letter api notifications

This commit is contained in:
Leo Hemsted
2017-07-27 11:10:22 +01:00
parent f528236eda
commit 2ab105aaf4
7 changed files with 120 additions and 39 deletions

View File

@@ -80,10 +80,12 @@ def test_post_notification_returns_400_and_missing_template(client, sample_servi
"message": 'Template not found'}]
@pytest.mark.parametrize("notification_type, key_send_to, send_to",
[("sms", "phone_number", "+447700900855"),
("email", "email_address", "sample@email.com")])
def test_post_notification_returns_403_and_well_formed_auth_error(client, sample_template,
@pytest.mark.parametrize("notification_type, key_send_to, send_to", [
("sms", "phone_number", "+447700900855"),
("email", "email_address", "sample@email.com"),
("letter", "personalisation", {"address_line_1": "The queen", "postcode": "SW1 1AA"})
])
def test_post_notification_returns_401_and_well_formed_auth_error(client, sample_template,
notification_type, key_send_to, send_to):
data = {
key_send_to: send_to,