Skip to content

Commit

Permalink
Merge eedc2fb into 32a21bf
Browse files Browse the repository at this point in the history
  • Loading branch information
servingUpAces committed Dec 7, 2016
2 parents 32a21bf + eedc2fb commit 8786a58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/accept_invite/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def get_invited_user_by_token(token):
current_app.config['DANGEROUS_SALT'],
max_age_seconds)
except SignatureExpired:
errors = {'invitation': ['Invitation has expired']}
errors = {'invitation':
['This invitation has expired please contact the person that invited you to invite you again']}
raise InvalidRequest(errors, status_code=400)

invited_user = get_invited_user_by_id(invited_user_id)
Expand Down
4 changes: 2 additions & 2 deletions tests/app/accept_invite/test_accept_invite_rest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import uuid

import pytest
from flask import json
from freezegun import freeze_time
from notifications_utils.url_safe_token import generate_token
Expand All @@ -20,7 +19,8 @@ def test_accept_invite_for_expired_token_returns_400(notify_api, sample_invited_
assert response.status_code == 400
json_resp = json.loads(response.get_data(as_text=True))
assert json_resp['result'] == 'error'
assert json_resp['message'] == {'invitation': ['Invitation has expired']}
assert json_resp['message'] == {'invitation': [
'This invitation has expired please contact the person that invited you to invite you again']}


def test_accept_invite_returns_200_when_token_valid(notify_api, sample_invited_user):
Expand Down

0 comments on commit 8786a58

Please sign in to comment.