Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-01-24 20:32:43 +0300
committerGitHub <noreply@github.com>2019-01-24 20:32:43 +0300
commitc7fd71ee7d25761187cfdbc06ebe6d2567b94190 (patch)
tree8abc626a5eb4c1098924975cbf3dcd6a1a39f759 /tests
parent081f96b42032848f158ccd39001518309f701bd6 (diff)
parent38f01c136163aaa095c081f166b200dd1678ff6a (diff)
Merge pull request #13767 from nextcloud/backport/13747/stable14
[stable14] Honor remember_login_cookie_lifetime
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/LoginControllerTest.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php
index f2e8d112b64..815a73da668 100644
--- a/tests/Core/Controller/LoginControllerTest.php
+++ b/tests/Core/Controller/LoginControllerTest.php
@@ -441,6 +441,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');
@@ -485,6 +489,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);
@@ -545,6 +553,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));
@@ -582,6 +594,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));
@@ -634,6 +650,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');
@@ -686,6 +706,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');