diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2021-03-23 20:05:58 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-03-23 21:11:25 +0100 |
commit | baf1ca8ec9e3964c97c6e11ca9c6a56e38b8fe48 (patch) | |
tree | 146a42d1be66f2ca81443f0bf084cc70d4dc2a35 /tests/Unit/Db/ItemMapperAfterTest.php | |
parent | 4e1d6eaa32524c119c4d2838e904aa02d3fced1b (diff) |
DB: Don't show deleted feed items
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'tests/Unit/Db/ItemMapperAfterTest.php')
-rw-r--r-- | tests/Unit/Db/ItemMapperAfterTest.php | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/tests/Unit/Db/ItemMapperAfterTest.php b/tests/Unit/Db/ItemMapperAfterTest.php index dbb883fc9..5c536e1bf 100644 --- a/tests/Unit/Db/ItemMapperAfterTest.php +++ b/tests/Unit/Db/ItemMapperAfterTest.php @@ -78,12 +78,13 @@ class ItemMapperAfterTest extends MapperTestUtility ->with('items', 'news_feeds', 'feeds', 'items.feed_id = feeds.id') ->will($this->returnSelf()); - $this->builder->expects($this->exactly(3)) + $this->builder->expects($this->exactly(4)) ->method('andWhere') ->withConsecutive( ['items.last_modified >= :updatedSince'], ['feeds.user_id = :userId'], - ['feeds.id = :feedId'] + ['feeds.id = :feedId'], + ['feeds.deleted_at = 0'] ) ->will($this->returnSelf()); @@ -142,12 +143,13 @@ class ItemMapperAfterTest extends MapperTestUtility ->with('items', 'news_feeds', 'feeds', 'items.feed_id = feeds.id') ->will($this->returnSelf()); - $this->builder->expects($this->exactly(4)) + $this->builder->expects($this->exactly(5)) ->method('andWhere') ->withConsecutive( ['items.last_modified >= :updatedSince'], ['feeds.user_id = :userId'], ['feeds.id = :feedId'], + ['feeds.deleted_at = 0'], ['items.unread = 1'] ) ->will($this->returnSelf()); @@ -210,11 +212,12 @@ class ItemMapperAfterTest extends MapperTestUtility ) ->will($this->returnSelf()); - $this->builder->expects($this->exactly(3)) + $this->builder->expects($this->exactly(4)) ->method('andWhere') ->withConsecutive( ['items.last_modified >= :updatedSince'], ['feeds.user_id = :userId'], + ['feeds.deleted_at = 0'], ['folders.id = :folderId'] ) ->will($this->returnSelf()); @@ -277,11 +280,12 @@ class ItemMapperAfterTest extends MapperTestUtility ) ->will($this->returnSelf()); - $this->builder->expects($this->exactly(4)) + $this->builder->expects($this->exactly(5)) ->method('andWhere') ->withConsecutive( ['items.last_modified >= :updatedSince'], ['feeds.user_id = :userId'], + ['feeds.deleted_at = 0'], ['folders.id = :folderId'], ['items.unread = 1'] ) @@ -342,10 +346,11 @@ class ItemMapperAfterTest extends MapperTestUtility ->withConsecutive(['items', 'news_feeds', 'feeds', 'items.feed_id = feeds.id']) ->will($this->returnSelf()); - $this->builder->expects($this->exactly(3)) + $this->builder->expects($this->exactly(4)) ->method('andWhere') ->withConsecutive( ['items.last_modified >= :updatedSince'], + ['feeds.deleted_at = 0'], ['feeds.user_id = :userId'], ['items.unread = 1'] ) @@ -405,10 +410,11 @@ class ItemMapperAfterTest extends MapperTestUtility ->withConsecutive(['items', 'news_feeds', 'feeds', 'items.feed_id = feeds.id']) ->will($this->returnSelf()); - $this->builder->expects($this->exactly(3)) + $this->builder->expects($this->exactly(4)) ->method('andWhere') ->withConsecutive( ['items.last_modified >= :updatedSince'], + ['feeds.deleted_at = 0'], ['feeds.user_id = :userId'], ['items.starred = 1'] ) @@ -468,10 +474,11 @@ class ItemMapperAfterTest extends MapperTestUtility ->withConsecutive(['items', 'news_feeds', 'feeds', 'items.feed_id = feeds.id']) ->will($this->returnSelf()); - $this->builder->expects($this->exactly(2)) + $this->builder->expects($this->exactly(3)) ->method('andWhere') ->withConsecutive( ['items.last_modified >= :updatedSince'], + ['feeds.deleted_at = 0'], ['feeds.user_id = :userId'] ) ->will($this->returnSelf()); @@ -533,10 +540,11 @@ class ItemMapperAfterTest extends MapperTestUtility ->withConsecutive(['items', 'news_feeds', 'feeds', 'items.feed_id = feeds.id']) ->will($this->returnSelf()); - $this->builder->expects($this->exactly(2)) + $this->builder->expects($this->exactly(3)) ->method('andWhere') ->withConsecutive( ['items.last_modified >= :updatedSince'], + ['feeds.deleted_at = 0'], ['feeds.user_id = :userId'] ) ->will($this->returnSelf()); @@ -574,4 +582,4 @@ class ItemMapperAfterTest extends MapperTestUtility $this->assertEquals([Item::fromRow(['id' => 4])], $result); } -}
\ No newline at end of file +} |