summaryrefslogtreecommitdiffstats
path: root/tests/unit/db/ItemMapperTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/db/ItemMapperTest.php')
-rw-r--r--tests/unit/db/ItemMapperTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/db/ItemMapperTest.php b/tests/unit/db/ItemMapperTest.php
index eb04b1514..ae045ce31 100644
--- a/tests/unit/db/ItemMapperTest.php
+++ b/tests/unit/db/ItemMapperTest.php
@@ -221,6 +221,18 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility {
}
+ public function testFindAllUnreadOrStarred(){
+ $status = StatusFlag::UNREAD | StatusFlag::STARRED;
+ $sql = 'AND ((`items`.`status` & ' . $status . ') > 0) ';
+ $sql = $this->makeSelectQuery($sql);
+ $params = array($this->user);
+ $this->setMapperResult($sql, $params, $this->rows);
+ $result = $this->mapper->findAllUnreadOrStarred($this->user);
+
+ $this->assertEquals($this->items, $result);
+ }
+
+
public function testFindAllFeed(){
$sql = 'AND `items`.`feed_id` = ? ' .
'AND `items`.`id` < ? ';