diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-29 21:31:41 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-29 21:52:14 +0200 |
commit | b1a090f3576895f526cd102c43aad56789e6e889 (patch) | |
tree | 38138f7aa535a9e34af5cc567828857ca32c66df /tests/Core | |
parent | f6423f74e3ca925fd43c67f2669384994ccc55fe (diff) | |
download | nextcloud-server-b1a090f3576895f526cd102c43aad56789e6e889.tar.gz nextcloud-server-b1a090f3576895f526cd102c43aad56789e6e889.zip |
AvatarController use proper JSONResponse
* Do not rely on DataResponse magic. We want JSON so use JSON
* Fix tests
Diffstat (limited to 'tests/Core')
-rw-r--r-- | tests/Core/Controller/AvatarControllerTest.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php index a275a8bd16a..fe1a44b28ab 100644 --- a/tests/Core/Controller/AvatarControllerTest.php +++ b/tests/Core/Controller/AvatarControllerTest.php @@ -228,7 +228,7 @@ class AvatarControllerTest extends \Test\TestCase { $this->logger->expects($this->once()) ->method('logException') ->with(new \Exception("foo")); - $expectedResponse = new Http\DataResponse(['data' => ['message' => 'An error occurred. Please contact your admin.']], Http::STATUS_BAD_REQUEST); + $expectedResponse = new Http\JSONResponse(['data' => ['message' => 'An error occurred. Please contact your admin.']], Http::STATUS_BAD_REQUEST); $this->assertEquals($expectedResponse, $this->avatarController->deleteAvatar()); } @@ -377,7 +377,7 @@ class AvatarControllerTest extends \Test\TestCase { $this->logger->expects($this->once()) ->method('logException') ->with(new \Exception("foo")); - $expectedResponse = new Http\DataResponse(['data' => ['message' => 'An error occurred. Please contact your admin.']], Http::STATUS_OK); + $expectedResponse = new Http\JSONResponse(['data' => ['message' => 'An error occurred. Please contact your admin.']], Http::STATUS_OK); $this->assertEquals($expectedResponse, $this->avatarController->postAvatar('avatar.jpg')); } @@ -437,7 +437,7 @@ class AvatarControllerTest extends \Test\TestCase { $this->logger->expects($this->once()) ->method('logException') ->with(new \Exception('foo')); - $expectedResponse = new Http\DataResponse(['data' => ['message' => 'An error occurred. Please contact your admin.']], Http::STATUS_BAD_REQUEST); + $expectedResponse = new Http\JSONResponse(['data' => ['message' => 'An error occurred. Please contact your admin.']], Http::STATUS_BAD_REQUEST); $this->assertEquals($expectedResponse, $this->avatarController->postCroppedAvatar(['x' => 0, 'y' => 0, 'w' => 10, 'h' => 11])); } |