summaryrefslogtreecommitdiffstats
path: root/tests/unit/controller/FeedControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/controller/FeedControllerTest.php')
-rw-r--r--tests/unit/controller/FeedControllerTest.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/unit/controller/FeedControllerTest.php b/tests/unit/controller/FeedControllerTest.php
index e3204517b..296f87b22 100644
--- a/tests/unit/controller/FeedControllerTest.php
+++ b/tests/unit/controller/FeedControllerTest.php
@@ -543,6 +543,30 @@ class FeedControllerTest extends ControllerTestUtility {
}
+ public function testRename(){
+ $post = array(
+ 'feedTitle' => "New Feed Title"
+ );
+ $url = array(
+ 'feedId' => 4
+ );
+ $this->controller = $this->getPostController($post, $url);
+
+ $this->api->expects($this->once())
+ ->method('getUserId')
+ ->will($this->returnValue($this->user));
+ $this->feedBusinessLayer->expects($this->once())
+ ->method('rename')
+ ->with($this->equalTo($url['feedId']),
+ $this->equalTo($post['feedTitle']),
+ $this->equalTo($this->user));
+
+ $response = $this->controller->rename();
+
+ $this->assertTrue($response instanceof JSONResponse);
+ }
+
+
public function testImportArticles() {
$feed = new Feed();