aboutsummaryrefslogtreecommitdiffstats
path: root/apps/oauth2/tests/Controller/SettingsControllerTest.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-09-26 20:12:24 +0200
committernpmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>2019-09-28 13:30:34 +0000
commit9e2bb5ef36b686ec619a069c65712f2d57c3a1cc (patch)
treeb912fa5df8344f0bdad80530502a1a42b9b7704b /apps/oauth2/tests/Controller/SettingsControllerTest.php
parent17cdcfe4a819708ac7f344d7aca2220a63c40310 (diff)
downloadnextcloud-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.php41
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');