From df07df3b29c1d08d0cadc6aa4b11ac82981d002b Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 25 Mar 2013 10:43:05 +0100 Subject: set last viewed feed type and id and added casts to int for parameters --- tests/controller/ItemControllerTest.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tests') 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'], -- cgit v1.2.3