summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-05-15 16:12:14 +0200
committerJoas Schilling <coding@schilljs.com>2023-05-15 16:12:14 +0200
commit33385d7ecb892a6674caf18647e5f2a6394d70b9 (patch)
tree768d2b40fa8c78fc3b38711f124c56aed8a19256 /tests
parent7ee81b65557c84c764a9014a0442c9915c82a9a8 (diff)
downloadnextcloud-server-33385d7ecb892a6674caf18647e5f2a6394d70b9.tar.gz
nextcloud-server-33385d7ecb892a6674caf18647e5f2a6394d70b9.zip
fix(tests): Adjust unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/LostControllerTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php
index 1481a1e46d4..84ec450943e 100644
--- a/tests/Core/Controller/LostControllerTest.php
+++ b/tests/Core/Controller/LostControllerTest.php
@@ -449,7 +449,7 @@ class LostControllerTest extends 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() {
@@ -477,7 +477,7 @@ class LostControllerTest extends 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() {
@@ -496,7 +496,7 @@ class LostControllerTest extends 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() {
@@ -516,7 +516,7 @@ class LostControllerTest extends 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() {
@@ -535,7 +535,7 @@ class LostControllerTest extends 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() {
@@ -565,7 +565,7 @@ class LostControllerTest extends 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() {
@@ -601,7 +601,7 @@ class LostControllerTest extends 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() {
@@ -629,7 +629,7 @@ class LostControllerTest extends 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() {