mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Update service type and crown when service is added to organisation
This commit is contained in:
@@ -132,11 +132,12 @@ def test_get_organisation_by_domain(
|
||||
assert response['result'] == 'error'
|
||||
|
||||
|
||||
def test_post_create_organisation(admin_request, notify_db_session):
|
||||
@pytest.mark.parametrize('crown', [True, False, None])
|
||||
def test_post_create_organisation(admin_request, notify_db_session, crown):
|
||||
data = {
|
||||
'name': 'test organisation',
|
||||
'active': True,
|
||||
'crown': False,
|
||||
'crown': crown,
|
||||
'organisation_type': 'local',
|
||||
}
|
||||
|
||||
@@ -192,20 +193,14 @@ def test_post_create_organisation_existing_name_raises_400(admin_request, sample
|
||||
'name': 'Service name',
|
||||
'crown': True,
|
||||
}, 'organisation_type is a required property'),
|
||||
({
|
||||
'active': False,
|
||||
'name': 'Service name',
|
||||
'crown': None,
|
||||
'organisation_type': 'central',
|
||||
}, 'crown None is not of type boolean'),
|
||||
({
|
||||
'active': False,
|
||||
'name': 'Service name',
|
||||
'crown': False,
|
||||
'organisation_type': 'foo',
|
||||
}, 'organisation_type foo is not one of [central, local, nhs]'),
|
||||
}, 'organisation_type foo is not one of [central, local, nhs_central, nhs_local, emergency_services, school_or_college, other]'), # noqa
|
||||
))
|
||||
def test_post_create_organisation_with_missing_name_gives_validation_error(
|
||||
def test_post_create_organisation_with_missing_data_gives_validation_error(
|
||||
admin_request,
|
||||
notify_db_session,
|
||||
data,
|
||||
|
||||
Reference in New Issue
Block a user