-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #930 from MasoniteFramework/fix/ajax-user
users now login immediately
- Loading branch information
Showing
4 changed files
with
13 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
__title__ = 'masonite' | ||
__description__ = 'The core for the Masonite framework' | ||
__url__ = 'https://github.com/MasoniteFramework/masonite' | ||
__version__ = '2.2.25' | ||
__version__ = '2.2.26' | ||
__author__ = 'Joseph Mancuso' | ||
__author_email__ = '[email protected]' | ||
__licence__ = 'MIT' |
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
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 |
---|---|---|
|
@@ -101,6 +101,7 @@ def test_get_user(self): | |
for driver in ('cookie', 'jwt'): | ||
self.auth.driver = driver | ||
self.assertTrue(self.auth.login_by_id(1)) | ||
self.assertTrue(self.request.user()) | ||
|
||
def test_get_user_returns_false_if_not_loggedin(self): | ||
for driver in ('cookie', 'jwt'): | ||
|
@@ -114,10 +115,12 @@ def test_logout_user(self): | |
self.auth.login('[email protected]', 'secret') | ||
self.assertTrue(self.request.get_cookie('token')) | ||
self.assertTrue(self.auth.user()) | ||
self.assertTrue(self.request.user()) | ||
|
||
self.auth.logout() | ||
self.assertFalse(self.request.get_cookie('token')) | ||
self.assertFalse(self.auth.user()) | ||
self.assertFalse(self.request.user()) | ||
|
||
def test_login_user_fails(self): | ||
for driver in ('cookie', 'jwt'): | ||
|