diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-19 13:01:44 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-19 13:01:44 +0200 |
commit | 76cc72393a2be7a54a849225accce6bbd1918129 (patch) | |
tree | c5c1f3ec45aae96b1c30f4a0382d3b53168ce530 /tests | |
parent | 67e00e798d85d897e4793077aa14bcb4fb3d1765 (diff) |
added a way to prevent feed from being updated
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/businesslayer/FeedBusinessLayerTest.php | 20 |
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; |