summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-04 13:13:25 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-04 13:13:25 +0200
commit3ec631a5c799e35ff5dbe519a3151ad62ad186b8 (patch)
tree5c06a5575407ade0e0e4c319b2cd5586b7dae221 /tests
parent4b994c97ad878cc3886ffbea1a6a2bf6b4a98def (diff)
autopurge all read items which are not starred if there are more than 1000
Diffstat (limited to 'tests')
-rw-r--r--tests/db/FeedMapperTest.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/db/FeedMapperTest.php b/tests/db/FeedMapperTest.php
index de414d9c8..58a683836 100644
--- a/tests/db/FeedMapperTest.php
+++ b/tests/db/FeedMapperTest.php
@@ -268,8 +268,10 @@ class FeedMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility {
public function testDeleteReadOlderThanId(){
$id = 10;
- $sql = 'DELETE FROM `*PREFIX*news_items` WHERE `id` < ?';
- $params = array($id);
+ $status = StatusFlag::STARRED | StatusFlag::UNREAD;
+ $sql = 'DELETE FROM `*PREFIX*news_items` WHERE `id` < ? ' .
+ 'AND NOT ((`status` & ?) > 0)';
+ $params = array($id, $status);
$this->setMapperResult($sql, $params);
$this->mapper->deleteReadOlderThanId($id);