mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Don’t show send/edit links for deleted template
Since you can’t really send or edit a deleted template we should show a message telling you that the template has been deleted. This is important because deleted templates still show up in the template statistics.
This commit is contained in:
@@ -245,6 +245,27 @@ def mock_get_service_template(mocker):
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_deleted_template(mocker):
|
||||
def _get(service_id, template_id, version=None):
|
||||
template = template_json(
|
||||
service_id,
|
||||
template_id,
|
||||
"Two week reminder",
|
||||
"sms",
|
||||
"Your vehicle tax is about to expire",
|
||||
archived=True
|
||||
)
|
||||
if version:
|
||||
template.update({'version': version})
|
||||
return {'data': template}
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_service_template',
|
||||
side_effect=_get
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_template_version(mocker, fake_uuid, user=None):
|
||||
if user is None:
|
||||
|
||||
Reference in New Issue
Block a user