diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-29 13:25:04 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-29 13:30:01 +0200 |
commit | 3fc18156ae0b586e8de0c82949acfa6291317536 (patch) | |
tree | 201e97511bea44c58b5e9d78d8cf36ae2e2b54f9 /tests/unit/businesslayer | |
parent | a03b54c6a59837d0045c140ea7aef3fae95daa95 (diff) |
go back to order by id, fix #138, use a newest item id to prevent marking items as read that the user didnt see yet fix #141, also update the starred count periodically
Diffstat (limited to 'tests/unit/businesslayer')
-rw-r--r-- | tests/unit/businesslayer/FeedBusinessLayerTest.php | 2 | ||||
-rw-r--r-- | tests/unit/businesslayer/ItemBusinessLayerTest.php | 40 |
2 files changed, 21 insertions, 21 deletions
diff --git a/tests/unit/businesslayer/FeedBusinessLayerTest.php b/tests/unit/businesslayer/FeedBusinessLayerTest.php index 0f8f61e4f..e6fb5bb7b 100644 --- a/tests/unit/businesslayer/FeedBusinessLayerTest.php +++ b/tests/unit/businesslayer/FeedBusinessLayerTest.php @@ -677,4 +677,6 @@ class FeedBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { $this->assertEquals($feed, $result); } + + } diff --git a/tests/unit/businesslayer/ItemBusinessLayerTest.php b/tests/unit/businesslayer/ItemBusinessLayerTest.php index 8a47fd599..e32a3b308 100644 --- a/tests/unit/businesslayer/ItemBusinessLayerTest.php +++ b/tests/unit/businesslayer/ItemBusinessLayerTest.php @@ -130,21 +130,20 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { } - public function testFindAllFeed(){ + public function testFindAllFeed(){ $type = FeedType::FEED; $this->mapper->expects($this->once()) ->method('findAllFeed') ->with($this->equalTo($this->id), $this->equalTo($this->limit), $this->equalTo($this->offset), - $this->equalTo($this->newestItemId), $this->equalTo($this->status), $this->equalTo($this->user)) ->will($this->returnValue($this->response)); $result = $this->itemBusinessLayer->findAll( $this->id, $type, $this->limit, - $this->offset, $this->newestItemId, $this->showAll, + $this->offset, $this->showAll, $this->user); $this->assertEquals($this->response, $result); } @@ -157,14 +156,13 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { ->with($this->equalTo($this->id), $this->equalTo($this->limit), $this->equalTo($this->offset), - $this->equalTo($this->newestItemId), $this->equalTo($this->status), $this->equalTo($this->user)) ->will($this->returnValue($this->response)); $result = $this->itemBusinessLayer->findAll( $this->id, $type, $this->limit, - $this->offset, $this->newestItemId, $this->showAll, + $this->offset, $this->showAll, $this->user); $this->assertEquals($this->response, $result); } @@ -176,33 +174,18 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { ->method('findAll') ->with( $this->equalTo($this->limit), $this->equalTo($this->offset), - $this->equalTo($this->newestItemId), $this->equalTo($this->status), $this->equalTo($this->user)) ->will($this->returnValue($this->response)); $result = $this->itemBusinessLayer->findAll( $this->id, $type, $this->limit, - $this->offset, $this->newestItemId, $this->showAll, + $this->offset, $this->showAll, $this->user); $this->assertEquals($this->response, $result); } - public function testStarredCount(){ - $star = 18; - - $this->mapper->expects($this->once()) - ->method('starredCount') - ->with($this->equalTo($this->user)) - ->will($this->returnValue($star)); - - $result = $this->itemBusinessLayer->starredCount($this->user); - - $this->assertEquals($star, $result); - } - - public function testStar(){ $itemId = 3; $feedId = 5; @@ -310,6 +293,21 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { $this->itemBusinessLayer->getNewestItemId($this->user); } + + public function testStarredCount(){ + $star = 18; + + $this->mapper->expects($this->once()) + ->method('starredCount') + ->with($this->equalTo($this->user)) + ->will($this->returnValue($star)); + + $result = $this->itemBusinessLayer->starredCount($this->user); + + $this->assertEquals($star, $result); + } + + } |