mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 07:51:13 -05:00
Updated schema to remove redundant 'content'
This commit is contained in:
@@ -73,7 +73,7 @@ def create_post_template_preview_response(template, body, url_root):
|
||||
"id": template.id,
|
||||
"type": template.template_type,
|
||||
"version": template.version,
|
||||
"content": {'body': body},
|
||||
"body": body,
|
||||
"subject": template.subject,
|
||||
"uri": "{}v2/template/{}/preview".format(url_root, template.id)
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ def test_valid_post_template_returns_200(client, sample_service, tmp_type):
|
||||
|
||||
assert resp_json['id'] == str(template.id)
|
||||
assert 'v2/template/{}/preview'.format(template.id) in resp_json['uri']
|
||||
assert 'Dear {}'.format(valid_data['personalisation']['Name']) in resp_json['content']['body']
|
||||
assert 'Dear {}'.format(valid_data['personalisation']['Name']) in resp_json['body']
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tmp_type", TEMPLATE_TYPES)
|
||||
|
||||
Reference in New Issue
Block a user