Make organisation logo nullable

Now we have the org banner branding, not all organisations need a logo.
So it shouldn’t be an error to not provide one.
This commit is contained in:
Chris Hill-Scott
2017-09-20 11:03:48 +01:00
parent 4d1c0a36c6
commit bde6a9e131
5 changed files with 30 additions and 13 deletions

View File

@@ -54,7 +54,7 @@ def test_post_create_organisation(admin_request, notify_db_session):
assert data['logo'] == response['data']['logo']
def test_post_create_organisation_without_logo_raises_error(admin_request, notify_db_session):
def test_post_create_organisation_without_logo_is_ok(admin_request, notify_db_session):
data = {
'name': 'test organisation',
'colour': '#0000ff',
@@ -62,9 +62,8 @@ def test_post_create_organisation_without_logo_raises_error(admin_request, notif
response = admin_request.post(
'organisation.create_organisation',
_data=data,
_expected_status=400
_expected_status=201,
)
assert response['errors'][0]['message'] == "logo is a required property"
def test_post_create_organisation_without_name_or_colour_is_valid(admin_request, notify_db_session):