diff options
Diffstat (limited to 'tests/lib/Authentication/Token/DefaultTokenProviderTest.php')
-rw-r--r-- | tests/lib/Authentication/Token/DefaultTokenProviderTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php index eeb249cfa8a..8af5e1e933a 100644 --- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php @@ -170,6 +170,17 @@ class DefaultTokenProviderTest extends TestCase { $this->tokenProvider->invalidateToken('token7'); } + public function testInvaildateTokenById() { + $id = 123; + $user = $this->getMock('\OCP\IUser'); + + $this->mapper->expects($this->once()) + ->method('deleteById') + ->with($user, $id); + + $this->tokenProvider->invalidateTokenById($user, $id); + } + public function testInvalidateOldTokens() { $defaultSessionLifetime = 60 * 60 * 24; $this->config->expects($this->once()) |