diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-05-19 11:20:22 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@owncloud.com> | 2016-05-23 09:11:12 +0200 |
commit | 74277c25be2f3231e52a73a684bd14452a9ff2aa (patch) | |
tree | ca68eac57db357563e64e9f323df667fcc28f8f6 /tests/settings | |
parent | 6495534bcdbbda8aa2748cc9f5d94dcb2bc7a04a (diff) | |
download | nextcloud-server-74277c25be2f3231e52a73a684bd14452a9ff2aa.tar.gz nextcloud-server-74277c25be2f3231e52a73a684bd14452a9ff2aa.zip |
add button to invalidate browser sessions/device tokens
Diffstat (limited to 'tests/settings')
-rw-r--r-- | tests/settings/controller/AuthSettingsControllerTest.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/settings/controller/AuthSettingsControllerTest.php b/tests/settings/controller/AuthSettingsControllerTest.php index 3b46a2caa2b..49491c8ff52 100644 --- a/tests/settings/controller/AuthSettingsControllerTest.php +++ b/tests/settings/controller/AuthSettingsControllerTest.php @@ -138,4 +138,19 @@ class AuthSettingsControllerTest extends TestCase { $this->assertEquals($expected, $this->controller->create($name)); } + public function testDestroy() { + $id = 123; + $user = $this->getMock('\OCP\IUser'); + + $this->userManager->expects($this->once()) + ->method('get') + ->with($this->uid) + ->will($this->returnValue($user)); + $this->tokenProvider->expects($this->once()) + ->method('invalidateTokenById') + ->with($user, $id); + + $this->assertEquals([], $this->controller->destroy($id)); + } + } |