summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/controller/FeedControllerTest.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/unit/controller/FeedControllerTest.php b/tests/unit/controller/FeedControllerTest.php
index 1ed389db3..ed20308ec 100644
--- a/tests/unit/controller/FeedControllerTest.php
+++ b/tests/unit/controller/FeedControllerTest.php
@@ -421,6 +421,7 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase {
$feed = new Feed();
$expected = [
+ 'starred' => 3,
'feeds' => [$feed]
];
@@ -430,6 +431,11 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase {
$this->equalTo($this->user))
->will($this->returnValue($feed));
+ $this->itemService->expects($this->once())
+ ->method('starredCount')
+ ->with($this->equalTo($this->user))
+ ->will($this->returnValue(3));
+
$response = $this->controller->import(array('json'));
$this->assertEquals($expected, $response);
@@ -443,9 +449,14 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase {
$this->equalTo($this->user))
->will($this->returnValue(null));
+ $this->itemService->expects($this->once())
+ ->method('starredCount')
+ ->with($this->equalTo($this->user))
+ ->will($this->returnValue(3));
+
$response = $this->controller->import(array('json'));
- $this->assertEquals([], $response);
+ $this->assertEquals(['starred' => 3], $response);
}