mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Add a test for sending email to provider
We had a test like this for sending sms, but not email. This meant that, for example, we weren’t checking that the provider was getting passed the HTML and plain text versions of the email.
This commit is contained in:
@@ -125,7 +125,7 @@ def test_send_notification_with_placeholders_replaced(notify_api, sample_email_t
|
||||
)
|
||||
assert response.status_code == 201
|
||||
assert encryption.decrypt(app.celery.tasks.send_email.apply_async.call_args[0][0][2]) == data
|
||||
assert response_data['body'] == 'Hello Jo'
|
||||
assert response_data['body'] == 'Hello Jo\nThis is an email from GOV.UK'
|
||||
assert response_data['subject'] == 'Jo'
|
||||
|
||||
|
||||
|
||||
@@ -576,7 +576,7 @@ def test_get_notification_by_id_returns_merged_template_content_for_email(
|
||||
|
||||
notification = json.loads(response.get_data(as_text=True))['data']['notification']
|
||||
assert response.status_code == 200
|
||||
assert notification['body'] == 'Hello world'
|
||||
assert notification['body'] == 'Hello world\nThis is an email from GOV.UK'
|
||||
assert notification['subject'] == 'world'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user