diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 12:54:38 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 12:54:38 +0100 |
commit | 0f9e0e3de77de68cc75ccd69395665f9e1346951 (patch) | |
tree | be6398f7134c3192e4ee0f89a88cbbfadfffc808 /tests/db/ItemMapperTest.php | |
parent | 77ec6f08aa4fb223fba859ca0f6060e84006da43 (diff) |
implemented feed update
Diffstat (limited to 'tests/db/ItemMapperTest.php')
-rw-r--r-- | tests/db/ItemMapperTest.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/db/ItemMapperTest.php b/tests/db/ItemMapperTest.php index 626ac2cd0..433120a9f 100644 --- a/tests/db/ItemMapperTest.php +++ b/tests/db/ItemMapperTest.php @@ -88,13 +88,12 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility { public function testFind(){ - $sql = $this->makeSelectQuery('WHERE `*PREFIX*news_items`.`id` = ? '); + $sql = $this->makeSelectQuery('AND `*PREFIX*news_items`.`id` = ? '); - $this->setMapperResult($sql, array($this->id, $this->userId), $this->row); + $this->setMapperResult($sql, array($this->userId, $this->id), $this->row); $result = $this->mapper->find($this->id, $this->userId); $this->assertEquals($this->items[0], $result); - } @@ -248,4 +247,15 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility { $this->assertEquals($this->items, $result); } + + public function testFindByGuidHash(){ + $hash = md5('test'); + $sql = $this->makeSelectQuery('AND `*PREFIX*news_items`.`guid_hash` = ? '); + + $this->setMapperResult($sql, array($this->userId, $hash), $this->row); + + $result = $this->mapper->findByGuidHash($hash, $this->userId); + $this->assertEquals($this->items[0], $result); + } + }
\ No newline at end of file |