summaryrefslogtreecommitdiffstats
path: root/tests/Core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-08-26 16:03:05 +0200
committerGitHub <noreply@github.com>2016-08-26 16:03:05 +0200
commit89c78bbce48ccd75e42245bf1d92910c50e2648f (patch)
tree7362a768fc265e36cc5f97e2459622d399962595 /tests/Core
parentc20aef87956ce0cc442d809f417f40d61bcd1485 (diff)
parent6af2efb67931863b27d96c74cdff1d2ca2615e52 (diff)
downloadnextcloud-server-89c78bbce48ccd75e42245bf1d92910c50e2648f.tar.gz
nextcloud-server-89c78bbce48ccd75e42245bf1d92910c50e2648f.zip
Merge pull request #1031 from nextcloud/2fa-infinite-redirect-loop
prevent infinite redirect loops if the there is no 2fa provider to pass
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Middleware/TwoFactorMiddlewareTest.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php
index 6b8f4928928..8247efa1b82 100644
--- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php
+++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php
@@ -132,6 +132,7 @@ class TwoFactorMiddlewareTest extends TestCase {
->will($this->returnValue(true));
$this->twoFactorManager->expects($this->once())
->method('needsSecondFactor')
+ ->with($user)
->will($this->returnValue(true));
$this->middleware->beforeController(null, 'index');
@@ -159,6 +160,7 @@ class TwoFactorMiddlewareTest extends TestCase {
->will($this->returnValue(true));
$this->twoFactorManager->expects($this->once())
->method('needsSecondFactor')
+ ->with($user)
->will($this->returnValue(false));
$twoFactorChallengeController = $this->getMockBuilder('\OC\Core\Controller\TwoFactorChallengeController')