summaryrefslogtreecommitdiffstats
path: root/tests/settings
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-05-19 11:20:22 +0200
committerChristoph Wurst <christoph@owncloud.com>2016-05-23 09:11:12 +0200
commit74277c25be2f3231e52a73a684bd14452a9ff2aa (patch)
treeca68eac57db357563e64e9f323df667fcc28f8f6 /tests/settings
parent6495534bcdbbda8aa2748cc9f5d94dcb2bc7a04a (diff)
downloadnextcloud-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.php15
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));
+ }
+
}