diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-09-05 13:14:28 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-09-05 13:24:41 +0300 |
commit | b96485b6bd30073fbce977587d7ea14c199880ed (patch) | |
tree | 44ad5cba561ad5017d33426411249771a1af362d /tests/lib/Authentication/TwoFactorAuth/ManagerTest.php | |
parent | 6be5dc91cb345886c14661f4ce7dd54a2e500f61 (diff) |
Fix login with basic auth
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Authentication/TwoFactorAuth/ManagerTest.php')
-rw-r--r-- | tests/lib/Authentication/TwoFactorAuth/ManagerTest.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index d623edbd9d9..4fa3b3d7e14 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -566,6 +566,8 @@ class ManagerTest extends TestCase { } public function testNeedsSecondFactorInvalidToken() { + $this->prepareNoProviders(); + $user = $this->createMock(IUser::class); $user->method('getUID') ->willReturn('user'); @@ -579,6 +581,8 @@ class ManagerTest extends TestCase { ->with('mysessionid') ->willThrowException(new OC\Authentication\Exceptions\InvalidTokenException()); - $this->assertTrue($this->manager->needsSecondFactor($user)); + $this->config->method('getUserKeys')->willReturn([]); + + $this->assertFalse($this->manager->needsSecondFactor($user)); } } |