aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Settings/Controller/AuthSettingsControllerTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-03-01 14:09:54 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-03-01 21:24:44 +0100
commit102f700d96556424e4b59fcc9fadd65c1a377225 (patch)
treebdd172ea009b5869960a78145d0d49489cae899f /tests/Settings/Controller/AuthSettingsControllerTest.php
parent2398d1183e7e561c8d3db7c06d8919d09c26b9e8 (diff)
downloadnextcloud-server-102f700d96556424e4b59fcc9fadd65c1a377225.tar.gz
nextcloud-server-102f700d96556424e4b59fcc9fadd65c1a377225.zip
Load auth tokens with the initial state API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/Settings/Controller/AuthSettingsControllerTest.php')
-rw-r--r--tests/Settings/Controller/AuthSettingsControllerTest.php47
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/Settings/Controller/AuthSettingsControllerTest.php b/tests/Settings/Controller/AuthSettingsControllerTest.php
index 6b2df70251f..198b3a72c33 100644
--- a/tests/Settings/Controller/AuthSettingsControllerTest.php
+++ b/tests/Settings/Controller/AuthSettingsControllerTest.php
@@ -76,53 +76,6 @@ class AuthSettingsControllerTest extends TestCase {
);
}
- public function testIndex() {
- $token1 = new DefaultToken();
- $token1->setId(100);
- $token2 = new DefaultToken();
- $token2->setId(200);
- $tokens = [
- $token1,
- $token2,
- ];
- $sessionToken = new DefaultToken();
- $sessionToken->setId(100);
-
- $this->tokenProvider->expects($this->once())
- ->method('getTokenByUser')
- ->with($this->uid)
- ->willReturn($tokens);
- $this->session->expects($this->once())
- ->method('getId')
- ->willReturn('session123');
- $this->tokenProvider->expects($this->once())
- ->method('getToken')
- ->with('session123')
- ->willReturn($sessionToken);
-
- $this->assertEquals([
- [
- 'id' => 100,
- 'name' => null,
- 'lastActivity' => 0,
- 'type' => 0,
- 'canDelete' => false,
- 'current' => true,
- 'scope' => ['filesystem' => true],
- 'canRename' => false,
- ],
- [
- 'id' => 200,
- 'name' => null,
- 'lastActivity' => 0,
- 'type' => 0,
- 'canDelete' => true,
- 'scope' => ['filesystem' => true],
- 'canRename' => true,
- ]
- ], $this->controller->index());
- }
-
public function testCreate() {
$name = 'Nexus 4';
$sessionToken = $this->createMock(IToken::class);