mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Fix broken links on template statistics page
Tests assumed that the API returns the template `id` as part of the object. It doesn’t – it returns it as the key used to look up the object. The `id` was missing from the transformation into the format used by the front end. For some reason Flask is fine building the URL with `template_id=None`, but obviously this doesn’t generate a valid link.
This commit is contained in:
@@ -649,11 +649,13 @@ def test_format_template_stats_to_list():
|
||||
'counts': counts,
|
||||
'name': 'foo',
|
||||
'requested_count': 7,
|
||||
'id': 'template_1_id',
|
||||
} in stats_list
|
||||
assert {
|
||||
'counts': {},
|
||||
'name': 'bar',
|
||||
'requested_count': 0,
|
||||
'id': 'template_2_id',
|
||||
} in stats_list
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user