diff options
author | Paul Tirk <paultirk@paultirk.com> | 2022-04-12 17:23:07 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-04-30 20:04:30 +0200 |
commit | 4b6816914221193d4812eafb75d329d230bbd08e (patch) | |
tree | 717d6a0db6228601483dee979054385fb7a288a4 /tests | |
parent | 81243985d24a6fc6fad803ce7f44e48a10751dfe (diff) |
also allow starring/unstarring multiple items by id
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Unit/Controller/ItemApiControllerTest.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/Unit/Controller/ItemApiControllerTest.php b/tests/Unit/Controller/ItemApiControllerTest.php index 749bb2d98..400c4fc32 100644 --- a/tests/Unit/Controller/ItemApiControllerTest.php +++ b/tests/Unit/Controller/ItemApiControllerTest.php @@ -517,4 +517,33 @@ class ItemApiControllerTest extends TestCase $this->class->unstarByItemId(123); } + + + public function testStarMultipleByItemIds() + { + $ids = [ 345, 678 ]; + + $this->itemService->expects($this->exactly(2)) + ->method('star') + ->withConsecutive( + [$this->user->getUID(), 345, true], + [$this->user->getUID(), 678, true] + ); + $this->class->starMultipleByItemIds($ids); + } + + + public function testUnstarMultipleByItemIds() + { + $ids = [ 345, 678 ]; + + $this->itemService->expects($this->exactly(2)) + ->method('star') + ->withConsecutive( + [$this->user->getUID(), 345, false], + [$this->user->getUID(), 678, false] + ); + + $this->class->unstarMultipleByItemIds($ids); + } } |