diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-03-01 14:09:54 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-03-01 21:24:44 +0100 |
commit | 102f700d96556424e4b59fcc9fadd65c1a377225 (patch) | |
tree | bdd172ea009b5869960a78145d0d49489cae899f /tests/Settings/Controller/AuthSettingsControllerTest.php | |
parent | 2398d1183e7e561c8d3db7c06d8919d09c26b9e8 (diff) | |
download | nextcloud-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.php | 47 |
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); |