diff options
Diffstat (limited to 'tests/unit/controller')
-rw-r--r-- | tests/unit/controller/ItemControllerTest.php | 14 | ||||
-rw-r--r-- | tests/unit/controller/PageControllerTest.php | 10 |
2 files changed, 2 insertions, 22 deletions
diff --git a/tests/unit/controller/ItemControllerTest.php b/tests/unit/controller/ItemControllerTest.php index 6bc5595d8..20876555a 100644 --- a/tests/unit/controller/ItemControllerTest.php +++ b/tests/unit/controller/ItemControllerTest.php @@ -15,7 +15,6 @@ namespace OCA\News\Controller; use \OCP\IRequest; use \OCP\AppFramework\Http; -use \OCP\AppFramework\Http\JSONResponse; use \OCA\News\Utility\ControllerTestUtility; use \OCA\News\Db\Item; @@ -126,7 +125,6 @@ class ItemControllerTest extends ControllerTestUtility { $result = $this->controller->read(); - $this->assertTrue($result instanceof JSONResponse); } @@ -147,7 +145,6 @@ class ItemControllerTest extends ControllerTestUtility { $this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND); $this->assertEquals($msg, $params['msg']); - $this->assertTrue($response instanceof JSONResponse); } @@ -183,7 +180,6 @@ class ItemControllerTest extends ControllerTestUtility { $this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND); $this->assertEquals($msg, $params['msg']); - $this->assertTrue($response instanceof JSONResponse); } @@ -203,7 +199,6 @@ class ItemControllerTest extends ControllerTestUtility { $this->equalTo($this->user)); $response = $this->controller->star(); - $this->assertTrue($response instanceof JSONResponse); } @@ -224,7 +219,6 @@ class ItemControllerTest extends ControllerTestUtility { $this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND); $this->assertEquals($msg, $params['msg']); - $this->assertTrue($response instanceof JSONResponse); } @@ -244,7 +238,6 @@ class ItemControllerTest extends ControllerTestUtility { $this->equalTo($this->user)); $response = $this->controller->unstar(); - $this->assertTrue($response instanceof JSONResponse); } @@ -265,7 +258,6 @@ class ItemControllerTest extends ControllerTestUtility { $this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND); $this->assertEquals($msg, $params['msg']); - $this->assertTrue($response instanceof JSONResponse); } @@ -289,7 +281,6 @@ class ItemControllerTest extends ControllerTestUtility { ->will($this->returnValue(array($feed))); $response = $this->controller->readAll(); - $this->assertTrue($response instanceof JSONResponse); $this->assertEquals($expected, $response->getData()); } @@ -362,7 +353,6 @@ class ItemControllerTest extends ControllerTestUtility { $response = $this->controller->index(); $this->assertEquals($result, $response->getData()); - $this->assertTrue($response instanceof JSONResponse); } @@ -395,7 +385,6 @@ class ItemControllerTest extends ControllerTestUtility { $response = $this->controller->index(); $this->assertEquals($result, $response->getData()); - $this->assertTrue($response instanceof JSONResponse); } @@ -419,7 +408,6 @@ class ItemControllerTest extends ControllerTestUtility { $response = $this->controller->index(); $this->assertEquals($result, $response->getData()); - $this->assertTrue($response instanceof JSONResponse); } @@ -472,7 +460,6 @@ class ItemControllerTest extends ControllerTestUtility { $response = $this->controller->newItems(); $this->assertEquals($result, $response->getData()); - $this->assertTrue($response instanceof JSONResponse); } @@ -499,7 +486,6 @@ class ItemControllerTest extends ControllerTestUtility { $response = $this->controller->newItems(); $this->assertEquals($result, $response->getData()); - $this->assertTrue($response instanceof JSONResponse); } diff --git a/tests/unit/controller/PageControllerTest.php b/tests/unit/controller/PageControllerTest.php index 49e155bd0..331303495 100644 --- a/tests/unit/controller/PageControllerTest.php +++ b/tests/unit/controller/PageControllerTest.php @@ -14,8 +14,6 @@ namespace OCA\News\Controller; use \OCP\IRequest; -use \OCP\AppFramework\Http\TemplateResponse; -use \OCP\AppFramework\Http\JSONResponse; use \OCA\News\Utility\ControllerTestUtility; @@ -67,7 +65,6 @@ class PageControllerTest extends ControllerTestUtility { public function testIndex(){ $response = $this->controller->index(); $this->assertEquals('main', $response->getTemplateName()); - $this->assertTrue($response instanceof TemplateResponse); } @@ -96,7 +93,6 @@ class PageControllerTest extends ControllerTestUtility { $response = $this->controller->settings(); $this->assertEquals($result, $response->getData()); - $this->assertTrue($response instanceof JSONResponse); } @@ -120,9 +116,8 @@ class PageControllerTest extends ControllerTestUtility { $this->equalTo($this->appName), $this->equalTo('compact'), $this->equalTo(true)); - $response = $this->controller->updateSettings(); + $this->controller->updateSettings(); - $this->assertTrue($response instanceof JSONResponse); } @@ -140,8 +135,7 @@ class PageControllerTest extends ControllerTestUtility { $this->equalTo('showAll'), $this->equalTo(true)); - $response = $this->controller->updateSettings(); + $this->controller->updateSettings(); - $this->assertTrue($response instanceof JSONResponse); } }
\ No newline at end of file |