diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-08-05 16:08:53 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-08-05 16:08:53 +0200 |
commit | c67335d9f8df4f5d7742ccfaced7434ef5be9f01 (patch) | |
tree | 585f77c1095b164be6e3aef35e97b91a0ae91c22 | |
parent | fca036611137f29ab003a6a12ca04196ba09d1c2 (diff) |
return proper response for update method
-rw-r--r-- | external/feedapi.php | 3 | ||||
-rw-r--r-- | tests/unit/external/FeedAPITest.php | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/external/feedapi.php b/external/feedapi.php index fba43b249..3acd87a0e 100644 --- a/external/feedapi.php +++ b/external/feedapi.php @@ -198,7 +198,7 @@ class FeedAPI extends Controller { )); } - return new JSONResponse($result); + return new JSONResponse($result); } @@ -213,6 +213,7 @@ class FeedAPI extends Controller { try { $this->feedBusinessLayer->update($feedId, $userId); + return new JSONResponse(); } catch(BusinessLayerException $ex) { return new JSONResponse(array('message' => $ex->getMessage()), Http::STATUS_NOT_FOUND); diff --git a/tests/unit/external/FeedAPITest.php b/tests/unit/external/FeedAPITest.php index 670f5f942..2963125b2 100644 --- a/tests/unit/external/FeedAPITest.php +++ b/tests/unit/external/FeedAPITest.php @@ -486,7 +486,8 @@ class FeedAPITest extends ControllerTestUtility { ->method('update') ->with($this->equalTo($feedId), $this->equalTo($userId)); - $this->feedAPI->update(); + $response = $this->feedAPI->update(); + $this->assertTrue($response instanceof JSONResponse); } |