diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-01-23 10:21:14 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-01-23 14:06:03 +0100 |
commit | ebd9f30d85a718c6f89589a4c0116b043093e99a (patch) | |
tree | 88d0c756db220200ff20ea7b3435d67fdab15ffb /tests/lib | |
parent | d59de22525a44ad413e1a57c3e4f6d91434d53a9 (diff) | |
download | nextcloud-server-ebd9f30d85a718c6f89589a4c0116b043093e99a.tar.gz nextcloud-server-ebd9f30d85a718c6f89589a4c0116b043093e99a.zip |
Request plain logout url
By requesting the plain logout url we allow it to be properly cached by
the caching router. We just add the requesttoken manually.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/NavigationManagerTest.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index 8bc1c372ac8..6649aba28b6 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -221,15 +221,10 @@ class NavigationManagerTest extends TestCase { return '/apps/test/'; }); $this->urlGenerator - ->expects($this->once()) - ->method('linkToRouteAbsolute') - ->with( - 'core.login.logout', - [ - 'requesttoken' => \OCP\Util::callRegister() - ] - ) - ->willReturn('https://example.com/logout'); + ->expects($this->once()) + ->method('linkToRouteAbsolute') + ->with('core.login.logout') + ->willReturn('https://example.com/logout'); $user = $this->createMock(IUser::class); $user->expects($this->any())->method('getUID')->willReturn('user001'); $this->userSession->expects($this->any())->method('getUser')->willReturn($user); @@ -275,7 +270,7 @@ class NavigationManagerTest extends TestCase { 'logout' => [ 'id' => 'logout', 'order' => 99999, - 'href' => 'https://example.com/logout', + 'href' => 'https://example.com/logout?requesttoken='. \OCP\Util::callRegister(), 'icon' => '/apps/core/img/actions/logout.svg', 'name' => 'Log out', 'active' => false, |