diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-11-28 15:30:35 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-11-28 15:30:35 +0100 |
commit | 72e599bc87753e31bb9d161d341b7f95bd671658 (patch) | |
tree | 69b99f6a08534948e6625c01ef10f9ea704e14cb /tests/unit | |
parent | 6ca631ff5c0b7d3fef16604ee4ed87354e3bbf72 (diff) |
Revert "also read duplicate feed items read"
This reverts commit 30e66657b8709e95240da4f252a3fce6797acfda.
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/db/ItemMapperTest.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/unit/db/ItemMapperTest.php b/tests/unit/db/ItemMapperTest.php index 12597fb46..8b42aebb8 100644 --- a/tests/unit/db/ItemMapperTest.php +++ b/tests/unit/db/ItemMapperTest.php @@ -166,6 +166,24 @@ class ItemMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { } + public function testReadFeed(){ + $sql = 'UPDATE `*PREFIX*news_items` ' . + 'SET `status` = `status` & ? ' . + ', `last_modified` = ? ' . + 'WHERE `feed_id` = ? ' . + 'AND `id` <= ? ' . + 'AND EXISTS (' . + 'SELECT * FROM `*PREFIX*news_feeds` ' . + 'WHERE `user_id` = ? ' . + 'AND `id` = ? ) '; + $params = [ + ~StatusFlag::UNREAD, $this->updatedSince, 3, 6, $this->user, 3 + ]; + $this->setMapperResult($sql, $params); + $this->mapper->readFeed(3, 6, $this->updatedSince, $this->user); + } + + public function testFindAllNew(){ $sql = 'AND `items`.`last_modified` >= ? '; $sql = $this->makeSelectQueryStatus($sql, $this->status); @@ -527,4 +545,4 @@ class ItemMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { } -} +}
\ No newline at end of file |