aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/authentication/token/defaulttokenprovidertest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/authentication/token/defaulttokenprovidertest.php')
-rw-r--r--tests/lib/authentication/token/defaulttokenprovidertest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/authentication/token/defaulttokenprovidertest.php b/tests/lib/authentication/token/defaulttokenprovidertest.php
index 1902227a4fa..eeb249cfa8a 100644
--- a/tests/lib/authentication/token/defaulttokenprovidertest.php
+++ b/tests/lib/authentication/token/defaulttokenprovidertest.php
@@ -103,6 +103,16 @@ class DefaultTokenProviderTest extends TestCase {
$this->assertEquals($this->time, $tk->getLastActivity());
}
+
+ public function testGetTokenByUser() {
+ $user = $this->getMock('\OCP\IUser');
+ $this->mapper->expects($this->once())
+ ->method('getTokenByUser')
+ ->with($user)
+ ->will($this->returnValue(['token']));
+
+ $this->assertEquals(['token'], $this->tokenProvider->getTokenByUser($user));
+ }
public function testGetPassword() {
$token = 'token1234';