summaryrefslogtreecommitdiffstats
path: root/tests/unit/controller/FeedControllerTest.php
diff options
context:
space:
mode:
authorDavide Saurino <davide.saurino@alcacoop.it>2013-11-16 12:51:13 +0100
committerDavide Saurino <davide.saurino@alcacoop.it>2013-11-16 12:51:13 +0100
commit260beb6b12b8955fbc1e4bf1a4494a51851a819c (patch)
tree0bbde53d86ad8d8bdfd9a508adb9f7c5a0af846d /tests/unit/controller/FeedControllerTest.php
parente7b94256e450a6c059aa5654236ae07096aeabf9 (diff)
Rename Feed: tests added
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();