summaryrefslogtreecommitdiffstats
path: root/tests/unit/db/ItemMapperTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-09-11 16:42:03 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-09-12 01:00:32 +0200
commit09f60e75c90e5734a3b11a0cca944bd42bc41665 (patch)
tree8ecdc41cd6bb7c2b338e8e82b2b1e090b4d82ce4 /tests/unit/db/ItemMapperTest.php
parent24cab805e7484a5d206974d05f8de38641435f8c (diff)
#342 implement export
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` < ? ';