diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-27 13:47:53 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-27 13:47:53 +0100 |
commit | 78674ebc36cf9d24309799651c09a7e194d15ea4 (patch) | |
tree | 6cf02edf94e6dee0d7c0f05b3d817fc6f96ecf74 /tests/controller | |
parent | 003ab9ca77a2df654bdd152a29f9cf8071d55b68 (diff) |
star by guid hash and feedid to also star an item if it has been updated in the meantime. read still only works on the current version of the item, that means if an item is updated on the server side and an older version is being read on the server it will not be marked as read
Diffstat (limited to 'tests/controller')
-rw-r--r-- | tests/controller/ItemControllerTest.php | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/controller/ItemControllerTest.php b/tests/controller/ItemControllerTest.php index 3ab3de145..6ec73f8b8 100644 --- a/tests/controller/ItemControllerTest.php +++ b/tests/controller/ItemControllerTest.php @@ -145,7 +145,8 @@ class ItemControllerTest extends ControllerTestUtility { public function testStar(){ $url = array( - 'itemId' => 4 + 'feedId' => 4, + 'guidHash' => md5('test') ); $this->controller = $this->getPostController(array(), $url); @@ -154,7 +155,11 @@ class ItemControllerTest extends ControllerTestUtility { ->will($this->returnValue($this->user)); $this->bl->expects($this->once()) ->method('star') - ->with($url['itemId'], true, $this->user); + ->with( + $this->equalTo($url['feedId']), + $this->equalTo($url['guidHash']), + $this->equalTo(true), + $this->equalTo($this->user)); $this->controller->star(); } @@ -162,7 +167,8 @@ class ItemControllerTest extends ControllerTestUtility { public function testUnstar(){ $url = array( - 'itemId' => 4 + 'feedId' => 4, + 'guidHash' => md5('test') ); $this->controller = $this->getPostController(array(), $url); @@ -171,7 +177,11 @@ class ItemControllerTest extends ControllerTestUtility { ->will($this->returnValue($this->user)); $this->bl->expects($this->once()) ->method('star') - ->with($url['itemId'], false, $this->user); + ->with( + $this->equalTo($url['feedId']), + $this->equalTo($url['guidHash']), + $this->equalTo(false), + $this->equalTo($this->user)); $this->controller->unstar(); } |