aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2023-03-28 09:41:04 +0200
committerGitHub <noreply@github.com>2023-03-28 09:41:04 +0200
commit346054f85402bcf6a2ccd9d672abf6d9194ea793 (patch)
treedaf77969bc2f8d84283467e59652d446c02db3a5 /tests
parentcfd7a571849ece0572b6e801cf0f21666e519ddb (diff)
downloadnextcloud-server-346054f85402bcf6a2ccd9d672abf6d9194ea793.tar.gz
nextcloud-server-346054f85402bcf6a2ccd9d672abf6d9194ea793.zip
Fix tests
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/LoginControllerTest.php29
1 files changed, 4 insertions, 25 deletions
diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php
index ae033582d3c..6044440bdaf 100644
--- a/tests/Core/Controller/LoginControllerTest.php
+++ b/tests/Core/Controller/LoginControllerTest.php
@@ -143,9 +143,8 @@ class LoginControllerTest extends TestCase {
->with('nc_token')
->willReturn(null);
$this->request
- ->expects($this->once())
- ->method('isUserAgent')
- ->willReturn(false);
+ ->method('getServerProtocol')
+ ->willReturn('https');
$this->config
->expects($this->never())
->method('deleteUserValue');
@@ -160,26 +159,6 @@ class LoginControllerTest extends TestCase {
$this->assertEquals($expected, $this->loginController->logout());
}
- public function testLogoutNoClearSiteData() {
- $this->request
- ->expects($this->once())
- ->method('getCookie')
- ->with('nc_token')
- ->willReturn(null);
- $this->request
- ->expects($this->once())
- ->method('isUserAgent')
- ->willReturn(true);
- $this->urlGenerator
- ->expects($this->once())
- ->method('linkToRouteAbsolute')
- ->with('core.login.showLoginForm')
- ->willReturn('/login');
-
- $expected = new RedirectResponse('/login');
- $this->assertEquals($expected, $this->loginController->logout());
- }
-
public function testLogoutWithToken() {
$this->request
->expects($this->once())
@@ -188,8 +167,8 @@ class LoginControllerTest extends TestCase {
->willReturn('MyLoginToken');
$this->request
->expects($this->once())
- ->method('isUserAgent')
- ->willReturn(false);
+ ->method('getServerProtocol')
+ ->willReturn('https');
$user = $this->createMock(IUser::class);
$user
->expects($this->once())