summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Controller/ItemApiControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Controller/ItemApiControllerTest.php')
-rw-r--r--tests/Unit/Controller/ItemApiControllerTest.php29
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);
+ }
}