Update error message

This commit is contained in:
Rebecca Law
2017-05-31 16:22:56 +01:00
parent 566e56f888
commit e3baf71016
2 changed files with 2 additions and 2 deletions

View File

@@ -95,4 +95,4 @@ def check_sms_content_char_count(content_count):
def service_can_schedule_notification(service, scheduled_for):
if scheduled_for:
if SCHEDULE_NOTIFICATIONS not in [p.permission for p in service.permissions]:
raise BadRequestError(message="Your service must be invited to schedule notifications via the API.")
raise BadRequestError(message="Cannot schedule notifications (this feature is invite-only)")

View File

@@ -397,4 +397,4 @@ def test_post_notification_raises_bad_request_if_service_not_invited_to_schedule
assert response.status_code == 400
error_json = json.loads(response.get_data(as_text=True))
assert error_json['errors'] == [
{"error": "BadRequestError", "message": 'Your service must be invited to schedule notifications via the API.'}]
{"error": "BadRequestError", "message": 'Cannot schedule notifications (this feature is invite-only)'}]