Do not send email in case of invite.

The user does not have to validate the email token, but it
was still being sent.
This commit is contained in:
Adam Shimali
2016-03-15 16:58:26 +00:00
parent 4782d8ca1f
commit 4adbcebc6f
2 changed files with 8 additions and 3 deletions

View File

@@ -212,6 +212,7 @@ def test_cancelled_invited_user_accepts_invited_redirect_to_cancelled_invitation
def test_new_user_accept_invite_completes_new_registration_redirects_to_verify(app_,
service_one,
sample_invite,
api_user_active,
mock_check_invite_token,
mock_dont_get_user_by_email,
mock_register_user,
@@ -250,6 +251,9 @@ def test_new_user_accept_invite_completes_new_registration_redirects_to_verify(a
assert response.status_code == 302
assert response.location == expected_redirect_location
from unittest.mock import ANY
mock_send_verify_code.assert_called_once_with(ANY, 'sms', data['mobile_number'])
mock_register_user.assert_called_with(data['name'],
data['email_address'],
data['mobile_number'],