diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-06 14:45:14 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-06 14:45:14 +0100 |
commit | dcf96e729991764e5dc5d5d9cc384540427dfdc4 (patch) | |
tree | ce4778585cdcd6f96ca5723e599ac718565a9d23 /tests/integration/db/ItemMapperTest.php | |
parent | 5395685b0556921bc87ccc7e4076caabd16f0bcf (diff) |
more integration tests
Diffstat (limited to 'tests/integration/db/ItemMapperTest.php')
-rw-r--r-- | tests/integration/db/ItemMapperTest.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/integration/db/ItemMapperTest.php b/tests/integration/db/ItemMapperTest.php index dcc27ab98..c86112d46 100644 --- a/tests/integration/db/ItemMapperTest.php +++ b/tests/integration/db/ItemMapperTest.php @@ -28,4 +28,40 @@ class ItemMapperTest extends NewsIntegrationTest { $this->assertEquals('Döner', $fetched->getBody()); } + + /** + * @expectedException OCP\AppFramework\Db\DoesNotExistException + */ + public function testFindNotFoundWhenDeletedFeed() { + $id = $this->items['not found feed']->getId(); + $this->itemMapper->find($id, $this->userId); + } + + + /** + * @expectedException OCP\AppFramework\Db\DoesNotExistException + */ + public function testFindNotFoundWhenDeletedFolder() { + $id = $this->items['not found folder']->getId(); + $this->itemMapper->find($id, $this->userId); + } + + + public function testDeleteOlderThanThreshold() { + $this->itemMapper->deleteReadOlderThanThreshold(1); + $item1 = $this->items['del1']; + $item2 = $this->items['del2']; + $item3 = $this->items['del3']; + $item4 = $this->items['del4']; + + $this->itemMapper->find($item3->getId(), $this->userId); + $this->itemMapper->find($item4->getId(), $this->userId); + + //$this->setExpectedException( + // 'OCP\AppFramework\Db\DoesNotExistException'); + $this->itemMapper->find($item1->getId(), $this->userId); + $this->itemMapper->find($item2->getId(), $this->userId); + } + + }
\ No newline at end of file |