diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-10-11 12:07:20 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-29 00:59:09 -0300 |
commit | 485d6d657761370dc200d9cdb023ad564c23c4e9 (patch) | |
tree | 51780af96b14ebdc716922fdc5fa647310ab45b4 /tests/Settings | |
parent | 2507e7459d42e47f0581aeb69b738fec6497c6b5 (diff) | |
download | nextcloud-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.php | 12 |
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); |