From dee17d002d87667f7d0f4478e1f0180135618c38 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 16 Apr 2013 15:19:05 +0200 Subject: dont show unread count when it is 0, dont bold read feeds, implemented autopaging --- tests/unit/controller/ItemControllerTest.php | 5 ++--- tests/unit/db/ItemMapperTest.php | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/controller/ItemControllerTest.php b/tests/unit/controller/ItemControllerTest.php index ca72ee330..953330855 100644 --- a/tests/unit/controller/ItemControllerTest.php +++ b/tests/unit/controller/ItemControllerTest.php @@ -232,9 +232,8 @@ class ItemControllerTest extends ControllerTestUtility { private function itemsApiExpects($id, $type){ $this->api->expects($this->once()) ->method('getUserValue') - ->with($this->equalTo($this->user), - $this->equalTo('showAll')) - ->will($this->returnValue('true')); + ->with($this->equalTo('showAll')) + ->will($this->returnValue('1')); $this->api->expects($this->once()) ->method('getUserId') ->will($this->returnValue($this->user)); diff --git a/tests/unit/db/ItemMapperTest.php b/tests/unit/db/ItemMapperTest.php index 56cfe62ab..a7fead8f0 100644 --- a/tests/unit/db/ItemMapperTest.php +++ b/tests/unit/db/ItemMapperTest.php @@ -175,7 +175,7 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility { public function testFindAllFeed(){ $sql = 'AND `items`.`feed_id` = ? ' . - 'AND `items`.`id` > ? ' . + 'AND `items`.`id` < ? ' . 'ORDER BY `items`.`id` DESC '; $sql = $this->makeSelectQueryStatus($sql, $this->status); $params = array($this->user, $this->id, $this->offset); @@ -202,7 +202,7 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility { public function testFindAllFolder(){ $sql = 'AND `feeds`.`folder_id` = ? ' . - 'AND `items`.`id` > ? ' . + 'AND `items`.`id` < ? ' . 'ORDER BY `items`.`id` DESC '; $sql = $this->makeSelectQueryStatus($sql, $this->status); $params = array($this->user, $this->id, @@ -229,7 +229,7 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility { public function testFindAll(){ - $sql = 'AND `items`.`id` > ? ' . + $sql = 'AND `items`.`id` < ? ' . 'ORDER BY `items`.`id` DESC '; $sql = $this->makeSelectQueryStatus($sql, $this->status); $params = array($this->user, $this->offset); -- cgit v1.2.3