diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2018-11-29 11:15:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-29 11:15:35 +0100 |
commit | 9f64149a38f1cd5f3942dd19720e335911d04f46 (patch) | |
tree | b7784dc177161bb35b6f1a6d7da3edd3d022aa60 /tests | |
parent | 68f04686a06f8d5e468aa53a51ec25602d1cd4f5 (diff) | |
parent | 6734e871717d0008b71b8b969878363c14be87c4 (diff) | |
download | nextcloud-server-9f64149a38f1cd5f3942dd19720e335911d04f46.tar.gz nextcloud-server-9f64149a38f1cd5f3942dd19720e335911d04f46.zip |
Merge pull request #12710 from nextcloud/remove-old-submit-button
Remove old button to submit the apppassword login
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Core/Controller/ClientFlowLoginControllerTest.php | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php index b54897ddc44..ba9caabd0b0 100644 --- a/tests/Core/Controller/ClientFlowLoginControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php @@ -242,70 +242,6 @@ class ClientFlowLoginControllerTest extends TestCase { $this->assertEquals($expected, $this->clientFlowLoginController->showAuthPickerPage('MyClientIdentifier')); } - public function testRedirectPageWithInvalidToken() { - $this->session - ->expects($this->once()) - ->method('get') - ->with('client.flow.state.token') - ->willReturn('OtherToken'); - - $expected = new TemplateResponse( - 'core', - '403', - [ - 'file' => 'State token does not match', - ], - 'guest' - ); - $expected->setStatus(Http::STATUS_FORBIDDEN); - $this->assertEquals($expected, $this->clientFlowLoginController->redirectPage('MyStateToken')); - } - - public function testRedirectPageWithoutToken() { - $this->session - ->expects($this->once()) - ->method('get') - ->with('client.flow.state.token') - ->willReturn(null); - - $expected = new TemplateResponse( - 'core', - '403', - [ - 'file' => 'State token does not match', - ], - 'guest' - ); - $expected->setStatus(Http::STATUS_FORBIDDEN); - $this->assertEquals($expected, $this->clientFlowLoginController->redirectPage('MyStateToken')); - } - - public function testRedirectPage() { - $this->session - ->expects($this->at(0)) - ->method('get') - ->with('client.flow.state.token') - ->willReturn('MyStateToken'); - $this->session - ->expects($this->at(1)) - ->method('get') - ->with('oauth.state') - ->willReturn('MyOauthStateToken'); - - $expected = new TemplateResponse( - 'core', - 'loginflow/redirect', - [ - 'urlGenerator' => $this->urlGenerator, - 'stateToken' => 'MyStateToken', - 'clientIdentifier' => 'Identifier', - 'oauthState' => 'MyOauthStateToken', - ], - 'guest' - ); - $this->assertEquals($expected, $this->clientFlowLoginController->redirectPage('MyStateToken', 'Identifier')); - } - public function testGenerateAppPasswordWithInvalidToken() { $this->session ->expects($this->once()) |