mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 02:41:14 -05:00
add updated_at to provider_details
it's set to utcnow from dao_update_provider_details
This commit is contained in:
@@ -43,7 +43,9 @@ def test_get_provider_details_contains_correct_fields(client, notify_db):
|
||||
headers=[create_authorization_header()]
|
||||
)
|
||||
json_resp = json.loads(response.get_data(as_text=True))['provider_details']
|
||||
allowed_keys = {"id", "display_name", "identifier", "priority", 'notification_type', "active", "version"}
|
||||
allowed_keys = {
|
||||
"id", "display_name", "identifier", "priority", 'notification_type', "active", "version", "updated_at"
|
||||
}
|
||||
assert allowed_keys == set(json_resp[0].keys())
|
||||
|
||||
|
||||
@@ -81,7 +83,11 @@ def test_should_be_able_to_update_status(client, restore_provider_details):
|
||||
assert not provider.active
|
||||
|
||||
|
||||
@pytest.mark.parametrize('field,value', [('identifier', 'new'), ('version', 7)])
|
||||
@pytest.mark.parametrize('field,value', [
|
||||
('identifier', 'new'),
|
||||
('version', 7),
|
||||
('updated_at', None)
|
||||
])
|
||||
def test_should_not_be_able_to_update_disallowed_fields(client, restore_provider_details, field, value):
|
||||
provider = ProviderDetails.query.first()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user