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:
authorRayn0r <andrew@ilpss8.myfirewall.org>2018-10-29 10:09:19 +0300
committerRayn0r <andrew@ilpss8.myfirewall.org>2018-10-30 13:36:16 +0300
commit82c2c10b2532b0968ada451d72ec04b33230af0e (patch)
tree8914df17374c938e2a5ebdc9f4b7cd2ed61c1dbf /tests
parent85eb43baffac1f5836d08161ced19b98e71189c0 (diff)
adapted automated test for autocomplete changes
Signed-off-by: Rayn0r <Andre.Weidemann@web.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/LoginControllerTest.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php
index f2e8d112b64..efe85d81e1c 100644
--- a/tests/Core/Controller/LoginControllerTest.php
+++ b/tests/Core/Controller/LoginControllerTest.php
@@ -199,6 +199,7 @@ class LoginControllerTest extends TestCase {
'alt_login' => [],
'resetPasswordLink' => null,
'throttle_delay' => 1000,
+ 'login_form_autocomplete' => 'off',
],
'guest'
);
@@ -223,6 +224,7 @@ class LoginControllerTest extends TestCase {
'alt_login' => [],
'resetPasswordLink' => null,
'throttle_delay' => 1000,
+ 'login_form_autocomplete' => 'off',
],
'guest'
);
@@ -255,10 +257,12 @@ class LoginControllerTest extends TestCase {
->method('isLoggedIn')
->willReturn(false);
$this->config
- ->expects($this->once())
+ ->expects($this->exactly(2))
->method('getSystemValue')
- ->with('lost_password_link')
- ->willReturn(false);
+ ->will($this->returnValueMap([
+ ['login_form_autocomplete', true, true],
+ ['lost_password_link', '', false],
+ ]));
$user = $this->createMock(IUser::class);
$user
->expects($this->once())
@@ -281,6 +285,7 @@ class LoginControllerTest extends TestCase {
'alt_login' => [],
'resetPasswordLink' => false,
'throttle_delay' => 1000,
+ 'login_form_autocomplete' => 'on',
],
'guest'
);
@@ -338,10 +343,12 @@ class LoginControllerTest extends TestCase {
->method('isLoggedIn')
->willReturn(false);
$this->config
- ->expects($this->once())
+ ->expects($this->exactly(2))
->method('getSystemValue')
- ->with('lost_password_link')
- ->willReturn(false);
+ ->will($this->returnValueMap([
+ ['login_form_autocomplete', true, true],
+ ['lost_password_link', '', false],
+ ]));
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('canChangePassword')
@@ -363,6 +370,7 @@ class LoginControllerTest extends TestCase {
'alt_login' => [],
'resetPasswordLink' => false,
'throttle_delay' => 1000,
+ 'login_form_autocomplete' => 'on',
],
'guest'
);