diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 10:43:05 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 10:43:05 +0100 |
commit | df07df3b29c1d08d0cadc6aa4b11ac82981d002b (patch) | |
tree | 4e7942982e78fb89091cd92134bf3a7b17fb06af /tests | |
parent | 88d59427390298c7f118f591b70db51c088039ae (diff) |
set last viewed feed type and id and added casts to int for parameters
Diffstat (limited to 'tests')
-rw-r--r-- | tests/controller/ItemControllerTest.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/controller/ItemControllerTest.php b/tests/controller/ItemControllerTest.php index 1c3ed44f0..fd1666812 100644 --- a/tests/controller/ItemControllerTest.php +++ b/tests/controller/ItemControllerTest.php @@ -28,8 +28,6 @@ namespace OCA\News\Controller; use \OCA\AppFramework\Http\Request; use \OCA\AppFramework\Http\JSONResponse; use \OCA\AppFramework\Utility\ControllerTestUtility; -use \OCA\AppFramework\Db\DoesNotExistException; -use \OCA\AppFramework\Db\MultipleObjectsReturnedException; use \OCA\News\Db\Item; use \OCA\News\Db\FeedType; @@ -235,6 +233,18 @@ class ItemControllerTest extends ControllerTestUtility { $this->api->expects($this->once()) ->method('getUserId') ->will($this->returnValue($this->user)); + $this->api->expects($this->at(2)) + ->method('setUserValue') + ->with($this->equalTo($this->user), + $this->equalTo('lastViewedFeedId'), + $this->equalTo($post['id'])); + $this->api->expects($this->at(3)) + ->method('setUserValue') + ->with($this->equalTo($this->user), + $this->equalTo('lastViewedFeedType'), + $this->equalTo($post['type'])); + + $this->bl->expects($this->once()) ->method('findAll') ->with($post['id'], $post['type'], $post['limit'], |