diff options
Diffstat (limited to 'tests/controller/PageControllerTest.php')
-rw-r--r-- | tests/controller/PageControllerTest.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/controller/PageControllerTest.php b/tests/controller/PageControllerTest.php index 5b72257ae..98c4cb3cc 100644 --- a/tests/controller/PageControllerTest.php +++ b/tests/controller/PageControllerTest.php @@ -26,7 +26,7 @@ namespace OCA\News\Controller; use \OCA\AppFramework\Http\Request; -use \OCA\AppFramework\Http\JSONResponse; +use \OCA\AppFramework\Http\TemplateResponse; use \OCA\AppFramework\Utility\ControllerTestUtility; use \OCA\AppFramework\Db\DoesNotExistException; use \OCA\AppFramework\Db\MultipleObjectsReturnedException; @@ -58,5 +58,11 @@ class PageControllerTest extends ControllerTestUtility { $this->assertAnnotations($this->controller, 'index', $annotations); } + public function testIndex(){ + $response = $this->controller->index(); + $this->assertEquals('main', $response->getTemplateName()); + $this->assertTrue($response instanceof TemplateResponse); + } + }
\ No newline at end of file |