mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(tests): Adjust unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
147d523913
commit
19b7545599
1 changed files with 8 additions and 8 deletions
|
|
@ -429,7 +429,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
|
||||
$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', true);
|
||||
$expectedResponse = ['status' => 'error', 'msg' => ''];
|
||||
$this->assertSame($expectedResponse, $response);
|
||||
$this->assertSame($expectedResponse, $response->getData());
|
||||
}
|
||||
|
||||
public function testSetPasswordSuccessful() {
|
||||
|
|
@ -451,7 +451,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
|
||||
$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', true);
|
||||
$expectedResponse = ['user' => 'ValidTokenUser', 'status' => 'success'];
|
||||
$this->assertSame($expectedResponse, $response);
|
||||
$this->assertSame($expectedResponse, $response->getData());
|
||||
}
|
||||
|
||||
public function testSetPasswordExpiredToken() {
|
||||
|
|
@ -470,7 +470,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
'status' => 'error',
|
||||
'msg' => 'Could not reset password because the token is expired',
|
||||
];
|
||||
$this->assertSame($expectedResponse, $response);
|
||||
$this->assertSame($expectedResponse, $response->getData());
|
||||
}
|
||||
|
||||
public function testSetPasswordInvalidDataInDb() {
|
||||
|
|
@ -490,7 +490,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
'status' => 'error',
|
||||
'msg' => 'Could not reset password because the token is invalid',
|
||||
];
|
||||
$this->assertSame($expectedResponse, $response);
|
||||
$this->assertSame($expectedResponse, $response->getData());
|
||||
}
|
||||
|
||||
public function testIsSetPasswordWithoutTokenFailing() {
|
||||
|
|
@ -509,7 +509,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
'status' => 'error',
|
||||
'msg' => 'Could not reset password because the token is invalid'
|
||||
];
|
||||
$this->assertSame($expectedResponse, $response);
|
||||
$this->assertSame($expectedResponse, $response->getData());
|
||||
}
|
||||
|
||||
public function testSetPasswordForDisabledUser() {
|
||||
|
|
@ -539,7 +539,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
'status' => 'error',
|
||||
'msg' => 'Could not reset password because the token is invalid'
|
||||
];
|
||||
$this->assertSame($expectedResponse, $response);
|
||||
$this->assertSame($expectedResponse, $response->getData());
|
||||
}
|
||||
|
||||
public function testSendEmailNoEmail() {
|
||||
|
|
@ -575,7 +575,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
}]]);
|
||||
$response = $this->lostController->setPassword('myToken', 'user', 'newpass', false);
|
||||
$expectedResponse = ['status' => 'error', 'msg' => '', 'encryption' => true];
|
||||
$this->assertSame($expectedResponse, $response);
|
||||
$this->assertSame($expectedResponse, $response->getData());
|
||||
}
|
||||
|
||||
public function testSetPasswordDontProceedMasterKey() {
|
||||
|
|
@ -603,7 +603,7 @@ class LostControllerTest extends \Test\TestCase {
|
|||
|
||||
$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', false);
|
||||
$expectedResponse = ['user' => 'ValidTokenUser', 'status' => 'success'];
|
||||
$this->assertSame($expectedResponse, $response);
|
||||
$this->assertSame($expectedResponse, $response->getData());
|
||||
}
|
||||
|
||||
public function testTwoUsersWithSameEmail() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue