diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/controller/FolderControllerTest.php | 2 | ||||
-rw-r--r-- | tests/db/FeedMapperTest.php | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/controller/FolderControllerTest.php b/tests/controller/FolderControllerTest.php index 531584ddc..346ddbd6e 100644 --- a/tests/controller/FolderControllerTest.php +++ b/tests/controller/FolderControllerTest.php @@ -60,7 +60,7 @@ class FolderControllerTest extends ControllerTestUtility { /** - * getAll + * folders */ public function testFoldersCalled(){ $this->folderBl->expects($this->once()) diff --git a/tests/db/FeedMapperTest.php b/tests/db/FeedMapperTest.php index 34747e0d9..8a0c2b733 100644 --- a/tests/db/FeedMapperTest.php +++ b/tests/db/FeedMapperTest.php @@ -120,8 +120,13 @@ class FeedMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility { array('id' => $this->feeds[0]->getId()), array('id' => $this->feeds[1]->getId()) ); - $sql = 'SELECT * FROM `*dbprefix*news_feeds` ' . - 'AND `user_id` = ?'; + $sql = 'SELECT `feeds`.*, COUNT(`items`.`id`) AS unread_count ' . + 'FROM `*dbprefix*news_feeds` `feeds` ' . + 'LEFT OUTER JOIN `*dbprefix*news_items` `items` ' . + 'ON `feeds`.`id` = `items`.`feed_id` ' . + 'WHERE (`items`.`status` & ?) > 0 ' . + 'AND `feeds`.`user_id` = ? ' . + 'GROUP BY `items`.`feed_id`'; $this->setMapperResult($sql, array($userId), $rows); |