Skip to content

Commit 4676eb6

Browse files
committed
Add scan-in test
1 parent 1f7b118 commit 4676eb6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/Bibs/ItemSpec.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ function it_can_be_scanned_in(AlmaClient $client, Library $library)
8181
->shouldHaveType(ScanInResponse::class);
8282
}
8383

84+
function it_can_be_scanned_in_with_params(AlmaClient $client, Library $library)
85+
{
86+
$client->postJSON('/bibs/990006312214702204/holdings/22163771200002204/items/23163771190002204?place_on_hold_shelf=true&op=scan&library=THAT+LIBRARY&circ_desk=OTHER_DESK')
87+
->shouldBeCalled()
88+
->willReturn(SpecHelper::getDummyData('scanin_transit_response.json'));
89+
90+
$library->code = 'THAT LIBRARY';
91+
92+
$this->scanIn($library, 'OTHER_DESK', ['place_on_hold_shelf' => 'true'])
93+
->shouldHaveType(ScanInResponse::class);
94+
}
95+
8496
public function it_has_requests()
8597
{
8698
$this->requests->shouldHaveType(Requests::class);

0 commit comments

Comments
 (0)