mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Update template json to return created_at and updated_at. Also fixed a bug where updated_at was not being added to the templates_history model.
This commit is contained in:
@@ -269,8 +269,10 @@ def test_should_be_able_to_get_all_templates_for_a_service(notify_api, sample_us
|
||||
update_json_resp = json.loads(response.get_data(as_text=True))
|
||||
assert update_json_resp['data'][0]['name'] == 'my template 1'
|
||||
assert update_json_resp['data'][0]['version'] == 1
|
||||
assert update_json_resp['data'][0]['created_at']
|
||||
assert update_json_resp['data'][1]['name'] == 'my template 2'
|
||||
assert update_json_resp['data'][1]['version'] == 1
|
||||
assert update_json_resp['data'][1]['created_at']
|
||||
|
||||
|
||||
def test_should_get_only_templates_for_that_service(notify_api, sample_user, service_factory):
|
||||
|
||||
@@ -91,5 +91,7 @@ def test_all_versions_of_template(notify_api, sample_template):
|
||||
json_resp = json.loads(resp.get_data(as_text=True))
|
||||
assert len(json_resp['data']) == 3
|
||||
assert json_resp['data'][0]['content'] == newest_content
|
||||
assert json_resp['data'][0]['updated_at']
|
||||
assert json_resp['data'][1]['content'] == newer_content
|
||||
assert json_resp['data'][1]['updated_at']
|
||||
assert json_resp['data'][2]['content'] == old_content
|
||||
|
||||
Reference in New Issue
Block a user