-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #98. Ouath logins now register new users automatically.
- Loading branch information
Showing
2 changed files
with
79 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,12 +128,12 @@ def _login_openid(self, provider, uid, email=None): | |
|
||
def test_login_openid_add_association(self): | ||
response = self._login_openid('google', 'http://www.google.com/accounts/123') | ||
self.assert_success_message_in_response(response, 'association successfully added.') | ||
self.assert_success_message_in_response(response, 'Welcome! You have been registered as a new user') | ||
self.assert_user_logged_in() | ||
|
||
def test_login_openid_with_email_add_association(self): | ||
response = self._login_openid('google', 'http://www.google.com/accounts/123', '[email protected]') | ||
self.assert_success_message_in_response(response, 'association successfully added.') | ||
self.assert_success_message_in_response(response, 'Welcome! You have been registered as a new user') | ||
self.assert_user_logged_in() | ||
user = models.User.query().get() | ||
self.assertEqual('[email protected]', user.email) | ||
|
@@ -146,9 +146,8 @@ def test_login_openid(self): | |
|
||
def test_login_twitter_no_association(self): | ||
response = self._test_login_twitter() | ||
self.assert_warning_message_in_response(response, | ||
"This Twitter account is not associated with any local account.") | ||
self.assert_user_not_logged_in() | ||
self.assert_success_message_in_response(response, "Welcome! You have been registered as a new user") | ||
self.assert_user_logged_in() | ||
|
||
def test_login_twitter_add_association(self): | ||
self.register_activate_login_testuser() | ||
|