summaryrefslogtreecommitdiffstats
path: root/tests/Settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-10-11 12:07:20 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-04-29 00:59:09 -0300
commit485d6d657761370dc200d9cdb023ad564c23c4e9 (patch)
tree51780af96b14ebdc716922fdc5fa647310ab45b4 /tests/Settings
parent2507e7459d42e47f0581aeb69b738fec6497c6b5 (diff)
downloadnextcloud-server-485d6d657761370dc200d9cdb023ad564c23c4e9.tar.gz
nextcloud-server-485d6d657761370dc200d9cdb023ad564c23c4e9.zip
use proper return codes and handle failure cases
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/Settings')
-rw-r--r--tests/Settings/Controller/UsersControllerTest.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/Settings/Controller/UsersControllerTest.php b/tests/Settings/Controller/UsersControllerTest.php
index b6eba294d36..1dd3b0c6979 100644
--- a/tests/Settings/Controller/UsersControllerTest.php
+++ b/tests/Settings/Controller/UsersControllerTest.php
@@ -2532,7 +2532,8 @@ class UsersControllerTest extends \Test\TestCase {
'data' => [
'message' => 'Error while disabling user.',
],
- ]
+ ],
+ Http::STATUS_FORBIDDEN
);
$response = $this->getController(true)->disable('abc');
$this->assertEquals($expectedResponse, $response);
@@ -2569,7 +2570,8 @@ class UsersControllerTest extends \Test\TestCase {
'data' => [
'message' => 'Error while disabling user.',
],
- ]
+ ],
+ Http::STATUS_FORBIDDEN
);
$response = $this->getController(false)->disable('abc');
$this->assertEquals($expectedResponse, $response);
@@ -2746,7 +2748,8 @@ class UsersControllerTest extends \Test\TestCase {
'data' => [
'message' => 'Error while enabling user.',
],
- ]
+ ],
+ Http::STATUS_FORBIDDEN
);
$response = $this->getController(true)->enable('abc');
$this->assertEquals($expectedResponse, $response);
@@ -2783,7 +2786,8 @@ class UsersControllerTest extends \Test\TestCase {
'data' => [
'message' => 'Error while enabling user.',
],
- ]
+ ],
+ Http::STATUS_FORBIDDEN
);
$response = $this->getController(false)->enable('abc');
$this->assertEquals($expectedResponse, $response);