diff options
author | Davide Saurino <davide.saurino@alcacoop.it> | 2013-11-16 12:51:13 +0100 |
---|---|---|
committer | Davide Saurino <davide.saurino@alcacoop.it> | 2013-11-16 12:51:13 +0100 |
commit | 260beb6b12b8955fbc1e4bf1a4494a51851a819c (patch) | |
tree | 0bbde53d86ad8d8bdfd9a508adb9f7c5a0af846d /tests/unit/businesslayer/FeedBusinessLayerTest.php | |
parent | e7b94256e450a6c059aa5654236ae07096aeabf9 (diff) |
Rename Feed: tests added
Diffstat (limited to 'tests/unit/businesslayer/FeedBusinessLayerTest.php')
-rw-r--r-- | tests/unit/businesslayer/FeedBusinessLayerTest.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/unit/businesslayer/FeedBusinessLayerTest.php b/tests/unit/businesslayer/FeedBusinessLayerTest.php index 5e379525d..454a4966e 100644 --- a/tests/unit/businesslayer/FeedBusinessLayerTest.php +++ b/tests/unit/businesslayer/FeedBusinessLayerTest.php @@ -459,6 +459,28 @@ class FeedBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { } + public function testRenameFeed(){ + $feedId = 3; + $feedTitle = "New Feed Title"; + $feed = new Feed(); + $feed->setTitle("Feed Title"); + $feed->setId($feedId); + + $this->feedMapper->expects($this->once()) + ->method('find') + ->with($this->equalTo($feedId), $this->equalTo($this->user)) + ->will($this->returnValue($feed)); + + $this->feedMapper->expects($this->once()) + ->method('update') + ->with($this->equalTo($feed)); + + $this->feedBusinessLayer->rename($feedId, $feedTitle, $this->user); + + $this->assertEquals($feedTitle, $feed->getTitle()); + } + + public function testImportArticles(){ $url = 'http://owncloud/nofeed'; |