mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -04:00
Allow adding broadcast templates
At the moment the page is the same as for text message templates, except: - different H1 - no guidance about personalisation, links, etc (until we decide how these should work) For now you won’t be able to really create a broadcast template, because the API doesn’t support it (the API will respond with a 400). But that’s OK because no real services have the broadcast permission yet. This required a bit of refactoring of how we check which template types a service can use, because there were some hard-coded assumptions about emails and text messages.
This commit is contained in:
@@ -14,7 +14,8 @@ letters_urls = [
|
||||
([], 403)
|
||||
])
|
||||
def test_letters_access_restricted(
|
||||
platform_admin_client,
|
||||
client_request,
|
||||
platform_admin_user,
|
||||
mocker,
|
||||
permissions,
|
||||
response_code,
|
||||
@@ -23,12 +24,12 @@ def test_letters_access_restricted(
|
||||
service_one,
|
||||
):
|
||||
service_one['permissions'] = permissions
|
||||
|
||||
mocker.patch('app.service_api_client.get_service', return_value={"data": service_one})
|
||||
|
||||
response = platform_admin_client.get(url(service_id=service_one['id']))
|
||||
|
||||
assert response.status_code == response_code
|
||||
client_request.login(platform_admin_user)
|
||||
client_request.get_url(
|
||||
url(service_id=service_one['id']),
|
||||
_follow_redirects=True,
|
||||
_expected_status=response_code,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('url', letters_urls)
|
||||
|
||||
Reference in New Issue
Block a user