Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-08-29 22:31:41 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-29 22:52:14 +0300
commitb1a090f3576895f526cd102c43aad56789e6e889 (patch)
tree38138f7aa535a9e34af5cc567828857ca32c66df /tests
parentf6423f74e3ca925fd43c67f2669384994ccc55fe (diff)
AvatarController use proper JSONResponse
* Do not rely on DataResponse magic. We want JSON so use JSON * Fix tests
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/AvatarControllerTest.php6
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]));
}