summaryrefslogtreecommitdiffstats
path: root/tests/unit/businesslayer/FeedBusinessLayerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/businesslayer/FeedBusinessLayerTest.php')
-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 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);
+ }
}