summaryrefslogtreecommitdiffstats
path: root/tests/unit/controller/FeedControllerTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-17 10:50:46 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-17 10:51:04 +0200
commit1fbcd35ac8f868e48228aafa375c5a305554a3c3 (patch)
treef3b40fa3e34f90774097bf78ceffc7f4527fa05b /tests/unit/controller/FeedControllerTest.php
parent19b9456b6a96e8139d62a498fb31a96ed36fb442 (diff)
always return the unreadcount when marking read to set update request as 0, dont create new feeds that only consist of unreadcount updates
Diffstat (limited to 'tests/unit/controller/FeedControllerTest.php')
-rw-r--r--tests/unit/controller/FeedControllerTest.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/unit/controller/FeedControllerTest.php b/tests/unit/controller/FeedControllerTest.php
index c7c69fb03..428ecc7d4 100644
--- a/tests/unit/controller/FeedControllerTest.php
+++ b/tests/unit/controller/FeedControllerTest.php
@@ -298,14 +298,20 @@ class FeedControllerTest extends ControllerTestUtility {
public function testUpdate(){
+ $feed = new Feed();
+ $feed->setId(3);
+ $feed->setUnreadCount(44);
$result = array(
'feeds' => array(
- new Feed()
+ array(
+ 'id' => $feed->getId(),
+ 'unreadCount' => $feed->getUnreadCount()
+ )
)
);
$url = array(
- 'feedId' => 4
+ 'feedId' => 4
);
$this->controller = $this->getPostController(array(), $url);
@@ -315,7 +321,7 @@ class FeedControllerTest extends ControllerTestUtility {
$this->feedBusinessLayer->expects($this->once())
->method('update')
->with($this->equalTo($url['feedId']), $this->equalTo($this->user))
- ->will($this->returnValue($result['feeds'][0]));
+ ->will($this->returnValue($feed));
$response = $this->controller->update();