mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Fix get started banner on dashboard
This banner was always being shown because the template was never getting sent the service’s templates from the API. This commit fixes this to only show the banner when a service has no templates, and adds some tests to make sure it doesn’t happen again.
This commit is contained in:
@@ -424,6 +424,17 @@ def mock_get_service_templates(mocker):
|
||||
side_effect=_create)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_service_templates_when_no_templates_exist(mocker):
|
||||
|
||||
def _create(service_id):
|
||||
return {'data': []}
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_service_templates',
|
||||
side_effect=_create)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_delete_service_template(mocker):
|
||||
def _delete(service_id, template_id):
|
||||
|
||||
Reference in New Issue
Block a user