mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Collect organisation type
So that we can default services to their appropriate text allowance, we need to find out what sector they're in. So let's start collecting that from teams as they create new services. I think Central/Local/NHS are the right options, but these can be easily changed if not.
This commit is contained in:
@@ -20,7 +20,7 @@ def test_get_should_render_add_service_template(
|
||||
):
|
||||
response = logged_in_client.get(url_for('main.add_service'))
|
||||
assert response.status_code == 200
|
||||
assert 'Which service do you want to set up notifications for?' in response.get_data(as_text=True)
|
||||
assert 'About your service' in response.get_data(as_text=True)
|
||||
|
||||
|
||||
def test_should_add_service_and_redirect_to_tour_when_no_services(
|
||||
@@ -33,10 +33,15 @@ def test_should_add_service_and_redirect_to_tour_when_no_services(
|
||||
):
|
||||
response = logged_in_client.post(
|
||||
url_for('main.add_service'),
|
||||
data={'name': 'testing the post'})
|
||||
data={
|
||||
'name': 'testing the post',
|
||||
'organisation_type': 'local',
|
||||
}
|
||||
)
|
||||
assert mock_get_services_with_no_services.called
|
||||
mock_create_service.assert_called_once_with(
|
||||
service_name='testing the post',
|
||||
organisation_type='local',
|
||||
message_limit=app_.config['DEFAULT_SERVICE_LIMIT'],
|
||||
restricted=True,
|
||||
user_id=api_user_active.id,
|
||||
@@ -72,10 +77,15 @@ def test_should_add_service_and_redirect_to_dashboard_when_existing_service(
|
||||
):
|
||||
response = logged_in_client.post(
|
||||
url_for('main.add_service'),
|
||||
data={'name': 'testing the post'})
|
||||
data={
|
||||
'name': 'testing the post',
|
||||
'organisation_type': 'central',
|
||||
}
|
||||
)
|
||||
assert mock_get_services.called
|
||||
mock_create_service.assert_called_once_with(
|
||||
service_name='testing the post',
|
||||
organisation_type='central',
|
||||
message_limit=app_.config['DEFAULT_SERVICE_LIMIT'],
|
||||
restricted=True,
|
||||
user_id=api_user_active.id,
|
||||
@@ -99,7 +109,13 @@ def test_should_return_form_errors_with_duplicate_service_name_regardless_of_cas
|
||||
logged_in_client,
|
||||
mock_create_duplicate_service,
|
||||
):
|
||||
response = logged_in_client.post(url_for('main.add_service'), data={'name': 'SERVICE ONE'})
|
||||
response = logged_in_client.post(
|
||||
url_for('main.add_service'),
|
||||
data={
|
||||
'name': 'SERVICE ONE',
|
||||
'organisation_type': 'central',
|
||||
},
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
assert 'This service name is already in use' in response.get_data(as_text=True)
|
||||
|
||||
Reference in New Issue
Block a user