diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-01-23 10:12:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-23 10:12:01 +0100 |
commit | f2b118a2561952663a9040e2909ff9d20ea60ffc (patch) | |
tree | cdeaf145eeb70bb9d3d81e92bbafeccfed26216b /tests | |
parent | 308d5d54def17c4b34b96c97d51d714b1da5f48d (diff) | |
parent | e6333c8fe389aca4e1e8349f276de0058c20c6bb (diff) | |
download | nextcloud-server-f2b118a2561952663a9040e2909ff9d20ea60ffc.tar.gz nextcloud-server-f2b118a2561952663a9040e2909ff9d20ea60ffc.zip |
Merge pull request #13747 from nextcloud/fix/honor_session_lifetime_if_remember_cookie_is_disabled
Honor remember_login_cookie_lifetime
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Core/Controller/LoginControllerTest.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index efe85d81e1c..bb21903b653 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -449,6 +449,10 @@ class LoginControllerTest extends TestCase { $this->config->expects($this->once()) ->method('setUserValue') ->with('uid', 'core', 'timezone', 'Europe/Berlin'); + $this->config + ->method('getSystemValue') + ->with('remember_login_cookie_lifetime') + ->willReturn(1234); $this->userSession->expects($this->never()) ->method('createRememberMeToken'); @@ -493,6 +497,10 @@ class LoginControllerTest extends TestCase { $this->config->expects($this->once()) ->method('deleteUserValue') ->with('uid', 'core', 'lostpassword'); + $this->config + ->method('getSystemValue') + ->with('remember_login_cookie_lifetime') + ->willReturn(1234); $this->userSession->expects($this->once()) ->method('createRememberMeToken') ->with($user); @@ -553,6 +561,10 @@ class LoginControllerTest extends TestCase { ->method('deleteUserValue'); $this->userSession->expects($this->never()) ->method('createRememberMeToken'); + $this->config + ->method('getSystemValue') + ->with('remember_login_cookie_lifetime') + ->willReturn(1234); $expected = new \OCP\AppFramework\Http\RedirectResponse($redirectUrl); $this->assertEquals($expected, $this->loginController->tryLogin('Jane', $password, $originalUrl)); @@ -590,6 +602,10 @@ class LoginControllerTest extends TestCase { $this->config->expects($this->once()) ->method('deleteUserValue') ->with('jane', 'core', 'lostpassword'); + $this->config + ->method('getSystemValue') + ->with('remember_login_cookie_lifetime') + ->willReturn(1234); $expected = new \OCP\AppFramework\Http\RedirectResponse(urldecode($redirectUrl)); $this->assertEquals($expected, $this->loginController->tryLogin('Jane', $password, $originalUrl)); @@ -642,6 +658,10 @@ class LoginControllerTest extends TestCase { $this->config->expects($this->once()) ->method('deleteUserValue') ->with('john', 'core', 'lostpassword'); + $this->config + ->method('getSystemValue') + ->with('remember_login_cookie_lifetime') + ->willReturn(1234); $this->userSession->expects($this->never()) ->method('createRememberMeToken'); @@ -694,6 +714,10 @@ class LoginControllerTest extends TestCase { $this->config->expects($this->once()) ->method('deleteUserValue') ->with('john', 'core', 'lostpassword'); + $this->config + ->method('getSystemValue') + ->with('remember_login_cookie_lifetime') + ->willReturn(1234); $this->userSession->expects($this->never()) ->method('createRememberMeToken'); |