diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2024-04-23 09:34:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-23 09:34:49 +0200 |
commit | 0211ed5eeb3e12c15c3873654a8bf2c7a8fa04f8 (patch) | |
tree | fd6b4958ceebe4929b0a674686c036a8359b7896 /tests | |
parent | 9476b0df79aae557b042f26a4e53f0f85352129e (diff) | |
parent | 22dc27810eb5e30adddbf126505e7b9f7842f7d6 (diff) | |
download | nextcloud-server-0211ed5eeb3e12c15c3873654a8bf2c7a8fa04f8.tar.gz nextcloud-server-0211ed5eeb3e12c15c3873654a8bf2c7a8fa04f8.zip |
Merge pull request #44745 from nextcloud/fix/auth/2fa-redirect-url
fix(auth): Keep redirect URL during 2FA setup and challenge
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Core/Controller/TwoFactorChallengeControllerTest.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/Core/Controller/TwoFactorChallengeControllerTest.php b/tests/Core/Controller/TwoFactorChallengeControllerTest.php index baf7feaa068..c937b925997 100644 --- a/tests/Core/Controller/TwoFactorChallengeControllerTest.php +++ b/tests/Core/Controller/TwoFactorChallengeControllerTest.php @@ -337,7 +337,7 @@ class TwoFactorChallengeControllerTest extends TestCase { $this->assertEquals($expected, $this->controller->solveChallenge('myprovider', 'token', '/url')); } - public function testSetUpProviders() { + public function testSetUpProviders(): void { $user = $this->createMock(IUser::class); $this->userSession->expects($this->once()) ->method('getUser') @@ -357,6 +357,7 @@ class TwoFactorChallengeControllerTest extends TestCase { $provider, ], 'logout_url' => 'logoutAttribute', + 'redirect_url' => null, ], 'guest' ); @@ -392,7 +393,7 @@ class TwoFactorChallengeControllerTest extends TestCase { $this->assertEquals($expected, $response); } - public function testSetUpProvider() { + public function testSetUpProvider(): void { $user = $this->createMock(IUser::class); $this->userSession->expects($this->once()) ->method('getUser') @@ -426,6 +427,7 @@ class TwoFactorChallengeControllerTest extends TestCase { 'provider' => $provider, 'logout_url' => 'logoutAttribute', 'template' => 'tmpl', + 'redirect_url' => null, ], 'guest' ); @@ -435,13 +437,14 @@ class TwoFactorChallengeControllerTest extends TestCase { $this->assertEquals($expected, $response); } - public function testConfirmProviderSetup() { + public function testConfirmProviderSetup(): void { $this->urlGenerator->expects($this->once()) ->method('linkToRoute') ->with( 'core.TwoFactorChallenge.showChallenge', [ 'challengeProviderId' => 'totp', + 'redirect_url' => null, ]) ->willReturn('2fa/select/page'); $expected = new RedirectResponse('2fa/select/page'); |