diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-05-21 21:10:45 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-05-21 21:10:45 +0200 |
commit | 031ba0ce524f35c70b776173917ae4ce3819951e (patch) | |
tree | a54c45c0e9b9412ae7970034e7621115dce714c8 /tests/unit/businesslayer/FeedBusinessLayerTest.php | |
parent | 284d428111d03c16561c15dc98daaab802d2cac4 (diff) |
When creating a feed or folder the it should purge the deleted
Edit
fix #176
Diffstat (limited to 'tests/unit/businesslayer/FeedBusinessLayerTest.php')
-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 882106693..9f8683d9b 100644 --- a/tests/unit/businesslayer/FeedBusinessLayerTest.php +++ b/tests/unit/businesslayer/FeedBusinessLayerTest.php @@ -740,4 +740,24 @@ class FeedBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { } + public function testPurgeDeletedWithoutInterval(){ + $feed1 = new Feed(); + $feed1->setId(3); + $feed2 = new Feed(); + $feed2->setId(5); + $feeds = array($feed1, $feed2); + + $this->feedMapper->expects($this->once()) + ->method('getToDelete') + ->with($this->equalTo(null), $this->equalTo($this->user)) + ->will($this->returnValue($feeds)); + $this->feedMapper->expects($this->at(1)) + ->method('delete') + ->with($this->equalTo($feed1)); + $this->feedMapper->expects($this->at(2)) + ->method('delete') + ->with($this->equalTo($feed2)); + + $this->feedBusinessLayer->purgeDeleted($this->user, false); + } } |