From 4594fc6d1fa20defa9f338dab4b609cbd7a21a9c Mon Sep 17 00:00:00 2001 From: Paul Tirk Date: Mon, 11 Apr 2022 15:11:49 +0000 Subject: add tests for starring/unstarring items by id Signed-off-by: Paul Tirk --- tests/Unit/Controller/ItemApiControllerTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/Unit/Controller/ItemApiControllerTest.php b/tests/Unit/Controller/ItemApiControllerTest.php index e5d53a940..b65b1245f 100644 --- a/tests/Unit/Controller/ItemApiControllerTest.php +++ b/tests/Unit/Controller/ItemApiControllerTest.php @@ -499,4 +499,22 @@ class ItemApiControllerTest extends TestCase } + public function testStarByItemId() + { + $this->itemService->expects($this->once()) + ->method('starByItemId') + ->with($this->uid, 123, true); + + $this->class->starByItemId(123); + } + + + public function testUnstarByItemId() + { + $this->itemService->expects($this->once()) + ->method('starByItemId') + ->with($this->uid, 123, false); + + $this->class->unstarByItemId(123); + } } -- cgit v1.2.3