diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-08-15 18:19:32 +0300 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-08-15 18:19:32 +0300 |
commit | 75d135d8d4edda203cd289c705fdc6bb2f9cbec6 (patch) | |
tree | ee5fd216d4676cca86627cf37288e0b2f499183f /tests | |
parent | 1c7fa3333ec91badc4ec83a62336d2940aa5768a (diff) |
Fix tests for LoginController
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Core/Controller/LoginControllerTest.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index bef0952638f..58788af2f4e 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -181,6 +181,7 @@ class LoginControllerTest extends TestCase { 'alt_login' => [], 'rememberLoginAllowed' => \OC_Util::rememberLoginAllowed(), 'rememberLoginState' => 0, + 'resetPasswordLink' => null, ], 'guest' ); @@ -239,6 +240,7 @@ class LoginControllerTest extends TestCase { 'alt_login' => [], 'rememberLoginAllowed' => \OC_Util::rememberLoginAllowed(), 'rememberLoginState' => 0, + 'resetPasswordLink' => false, ], 'guest' ); @@ -277,6 +279,7 @@ class LoginControllerTest extends TestCase { 'alt_login' => [], 'rememberLoginAllowed' => \OC_Util::rememberLoginAllowed(), 'rememberLoginState' => 0, + 'resetPasswordLink' => false, ], 'guest' ); @@ -328,7 +331,7 @@ class LoginControllerTest extends TestCase { /** @var IUser | \PHPUnit_Framework_MockObject_MockObject $user */ $user = $this->getMockBuilder('\OCP\IUser')->getMock(); $password = 'secret'; - $indexPageUrl = 'some url'; + $indexPageUrl = 'http://localhost/index.php/apps/files/'; $this->request ->expects($this->exactly(2)) @@ -360,10 +363,6 @@ class LoginControllerTest extends TestCase { ->method('isTwoFactorAuthenticated') ->with($user) ->will($this->returnValue(false)); - $this->urlGenerator->expects($this->once()) - ->method('linkToRoute') - ->with('files.view.index') - ->will($this->returnValue($indexPageUrl)); $expected = new \OCP\AppFramework\Http\RedirectResponse($indexPageUrl); $this->assertEquals($expected, $this->loginController->tryLogin($user, $password, null)); |