From 4676eb6b92a5771d06de0625f85518c0b910f47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Fri, 3 Aug 2018 16:37:45 +0200 Subject: [PATCH] Add scan-in test --- spec/Bibs/ItemSpec.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/Bibs/ItemSpec.php b/spec/Bibs/ItemSpec.php index b23ea34..296094e 100644 --- a/spec/Bibs/ItemSpec.php +++ b/spec/Bibs/ItemSpec.php @@ -81,6 +81,18 @@ function it_can_be_scanned_in(AlmaClient $client, Library $library) ->shouldHaveType(ScanInResponse::class); } + function it_can_be_scanned_in_with_params(AlmaClient $client, Library $library) + { + $client->postJSON('/bibs/990006312214702204/holdings/22163771200002204/items/23163771190002204?place_on_hold_shelf=true&op=scan&library=THAT+LIBRARY&circ_desk=OTHER_DESK') + ->shouldBeCalled() + ->willReturn(SpecHelper::getDummyData('scanin_transit_response.json')); + + $library->code = 'THAT LIBRARY'; + + $this->scanIn($library, 'OTHER_DESK', ['place_on_hold_shelf' => 'true']) + ->shouldHaveType(ScanInResponse::class); + } + public function it_has_requests() { $this->requests->shouldHaveType(Requests::class);