]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix tests
authorCornelius Kölbel <cornelius.koelbel@netknights.it>
Tue, 15 Nov 2016 07:51:07 +0000 (08:51 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 11 Jan 2017 10:01:54 +0000 (11:01 +0100)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
tests/Core/Controller/TwoFactorChallengeControllerTest.php

index 9421a2537e8c0ca1e8c262a5c831dee46124fbff..3486ae55e2ee4226c0226c04ee58e21e4b9993d2 100644 (file)
@@ -126,9 +126,11 @@ class TwoFactorChallengeControllerTest extends TestCase {
                        ->method('exists')
                        ->with('two_factor_auth_error')
                        ->will($this->returnValue(true));
-               $this->session->expects($this->once())
+               $this->session->expects($this->exactly(2))
                        ->method('remove')
-                       ->with('two_factor_auth_error');
+                       ->with($this->logicalOr(
+                               $this->equalTo('two_factor_auth_error'),
+                               $this->equalTo('two_factor_auth_error_message')));
                $provider->expects($this->once())
                        ->method('getTemplate')
                        ->with($user)
@@ -144,6 +146,7 @@ class TwoFactorChallengeControllerTest extends TestCase {
                        'logout_attribute' => 'logoutAttribute',
                        'template' => '<html/>',
                        'redirect_url' => '/re/dir/ect/url',
+                       'error_message' => null,
                        ], 'guest');
 
                $this->assertEquals($expected, $this->controller->showChallenge('myprovider', '/re/dir/ect/url'));