summaryrefslogtreecommitdiffstats
path: root/tests/lib/Authentication
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Authentication')
-rw-r--r--tests/lib/Authentication/Token/DefaultTokenProviderTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
index e04424e4628..98cee208065 100644
--- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
+++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
@@ -135,6 +135,17 @@ class DefaultTokenProviderTest extends TestCase {
}
/**
+ * @expectedException \OC\Authentication\Exceptions\PasswordlessTokenException
+ */
+ public function testGetPasswordPasswordLessToken() {
+ $token = 'token1234';
+ $tk = new DefaultToken();
+ $tk->setPassword(null);
+
+ $this->tokenProvider->getPassword($tk, $token);
+ }
+
+ /**
* @expectedException \OC\Authentication\Exceptions\InvalidTokenException
*/
public function testGetPasswordDeletesInvalidToken() {