mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix(tests): Adjust unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
83b9109425
commit
8edb6b3e65
1 changed files with 8 additions and 8 deletions
|
|
@ -430,7 +430,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() {
|
||||
|
|
@ -452,7 +452,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() {
|
||||
|
|
@ -471,7 +471,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() {
|
||||
|
|
@ -491,7 +491,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() {
|
||||
|
|
@ -510,7 +510,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() {
|
||||
|
|
@ -540,7 +540,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() {
|
||||
|
|
@ -576,7 +576,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() {
|
||||
|
|
@ -604,7 +604,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