diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-02-02 00:25:39 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-02-02 00:25:39 +0100 |
commit | 374ad065e264c0eaa98232d959523351d3238b10 (patch) | |
tree | ab4c014ed885cd3603720219ea1767d09f98568e /tests/controller | |
parent | d4064fe2c7c1b5a6eb89714503c0fe775729d8af (diff) |
added returns json test
Diffstat (limited to 'tests/controller')
-rw-r--r-- | tests/controller/FolderControllerTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/controller/FolderControllerTest.php b/tests/controller/FolderControllerTest.php index de05f8dee..bec8ec788 100644 --- a/tests/controller/FolderControllerTest.php +++ b/tests/controller/FolderControllerTest.php @@ -26,6 +26,7 @@ namespace OCA\News\Controller; use \OCA\AppFramework\Http\Request; +use \OCA\AppFramework\Http\JSONResponse; use OCA\AppFramework\Utility\ControllerTestUtility; @@ -85,4 +86,14 @@ class FolderControllerTest extends ControllerTestUtility { } + public function testReturnsJSON(){ + $this->folderMapper->expects($this->once()) + ->method('getAll') + ->will($this->returnValue( array() )); + + $response = $this->controller->getAll(); + + $this->assertTrue($response instanceof JSONResponse); + } + }
\ No newline at end of file |