diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-09-26 20:12:24 +0200 |
---|---|---|
committer | npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> | 2019-09-28 13:30:34 +0000 |
commit | 9e2bb5ef36b686ec619a069c65712f2d57c3a1cc (patch) | |
tree | b912fa5df8344f0bdad80530502a1a42b9b7704b /apps/oauth2/tests/Controller/SettingsControllerTest.php | |
parent | 17cdcfe4a819708ac7f344d7aca2220a63c40310 (diff) | |
download | nextcloud-server-9e2bb5ef36b686ec619a069c65712f2d57c3a1cc.tar.gz nextcloud-server-9e2bb5ef36b686ec619a069c65712f2d57c3a1cc.zip |
Move oauth admin settings to initialstate
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'apps/oauth2/tests/Controller/SettingsControllerTest.php')
-rw-r--r-- | apps/oauth2/tests/Controller/SettingsControllerTest.php | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php index 4e4a69c9405..a14d7aad782 100644 --- a/apps/oauth2/tests/Controller/SettingsControllerTest.php +++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php @@ -144,47 +144,6 @@ class SettingsControllerTest extends TestCase { $this->assertEquals([], $result->getData()); } - public function testGetClients() { - $client1 = new Client(); - $client1->setId(123); - $client1->setName('My Client Name'); - $client1->setRedirectUri('https://example.com/'); - $client1->setSecret('MySecret'); - $client1->setClientIdentifier('MyClientIdentifier'); - - $client2 = new Client(); - $client2->setId(42); - $client2->setName('My Client Name2'); - $client2->setRedirectUri('https://example.com/2'); - $client2->setSecret('MySecret2'); - $client2->setClientIdentifier('MyClientIdentifier2'); - - $this->clientMapper->method('getClients') - ->willReturn([$client1, $client2]); - - $result = $this->settingsController->getClients(); - $this->assertInstanceOf(JSONResponse::class, $result); - - $data = $result->getData(); - - $this->assertSame([ - [ - 'id' => 123, - 'name' => 'My Client Name', - 'redirectUri' => 'https://example.com/', - 'clientId' => 'MyClientIdentifier', - 'clientSecret' => 'MySecret', - ], - [ - 'id' => 42, - 'name' => 'My Client Name2', - 'redirectUri' => 'https://example.com/2', - 'clientId' => 'MyClientIdentifier2', - 'clientSecret' => 'MySecret2', - ], - ], $data); - } - public function testInvalidRedirectUri() { $result = $this->settingsController->addClient('test', 'invalidurl'); |