summaryrefslogtreecommitdiffstats
path: root/tests/db/ItemMapperTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-26 11:08:14 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-26 11:08:14 +0100
commitd0fde9dbce129b0dbb94d577d9685764c7d5ea4b (patch)
treeef7724db5fa4cf373a4c2393972ec4e65953593a /tests/db/ItemMapperTest.php
parent3560ac0555ef2fbb7320e946c36d46aeef71b0b5 (diff)
also use feedid because feed + guid hash are unique together
Diffstat (limited to 'tests/db/ItemMapperTest.php')
-rw-r--r--tests/db/ItemMapperTest.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/db/ItemMapperTest.php b/tests/db/ItemMapperTest.php
index 7c1cb743e..f528e31c3 100644
--- a/tests/db/ItemMapperTest.php
+++ b/tests/db/ItemMapperTest.php
@@ -249,11 +249,14 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility {
public function testFindByGuidHash(){
$hash = md5('test');
- $sql = $this->makeSelectQuery('AND `*PREFIX*news_items`.`guid_hash` = ? ');
+ $feedId = 3;
+ $sql = $this->makeSelectQuery(
+ 'AND `items`.`guid_hash` = ? ' .
+ 'AND `feed`.`id = ? ');
- $this->setMapperResult($sql, array($this->userId, $hash), $this->row);
+ $this->setMapperResult($sql, array($this->userId, $hash, $feedId), $this->row);
- $result = $this->mapper->findByGuidHash($hash, $this->userId);
+ $result = $this->mapper->findByGuidHash($hash, $feedId, $this->userId);
$this->assertEquals($this->items[0], $result);
}