mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Fix tests
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
cfd7a57184
commit
346054f854
1 changed files with 4 additions and 25 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue