summaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-19 13:01:44 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-19 13:01:44 +0200
commit76cc72393a2be7a54a849225accce6bbd1918129 (patch)
treec5c1f3ec45aae96b1c30f4a0382d3b53168ce530 /tests/unit
parent67e00e798d85d897e4793077aa14bcb4fb3d1765 (diff)
added a way to prevent feed from being updated
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/businesslayer/FeedBusinessLayerTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/unit/businesslayer/FeedBusinessLayerTest.php b/tests/unit/businesslayer/FeedBusinessLayerTest.php
index 0b147c837..465dda8cb 100644
--- a/tests/unit/businesslayer/FeedBusinessLayerTest.php
+++ b/tests/unit/businesslayer/FeedBusinessLayerTest.php
@@ -480,6 +480,26 @@ class FeedBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility {
}
+ public function testUpdateDoesntUpdateIfFeedIsPrevented() {
+ $feedId = 3;
+ $folderId = 4;
+ $feed = new Feed();
+ $feed->setFolderId(16);
+ $feed->setId($feedId);
+ $feed->setPreventUpdate(true);
+
+ $this->mapper->expects($this->once())
+ ->method('find')
+ ->with($this->equalTo($feedId),
+ $this->equalTo($this->user))
+ ->will($this->returnValue($feed));
+ $this->fetcher->expects($this->never())
+ ->method('fetch');
+
+ $this->businessLayer->update($feedId, $this->user);
+ }
+
+
public function testMove(){
$feedId = 3;
$folderId = 4;