make the checkin test match what both SIP stacks are actually doing here
authorJason Etheridge <jason@EquinoxOLI.org>
Tue, 31 May 2022 08:01:55 +0000 (04:01 -0400)
committerJason Etheridge <jason@EquinoxOLI.org>
Tue, 31 May 2022 08:01:55 +0000 (04:01 -0400)
Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
t/08checkin.t

index 681a4d3..52d543b 100755 (executable)
@@ -71,7 +71,12 @@ my $test;
 # the ILS didn't check the item in, and there's no patron id.
 $test = clone($checkin_test_template);
 $test->{id} = 'Checkin: Item not checked out';
-$test->{pat} = qr/^100YNN$datepat/o;
+$test->{pat} = qr/^101YNN$datepat/o;
+#                    ^--- ok field
+# So this one is weird; the SIP spec says that value should be 1 if the ACS checked in the item 0 and otherwise.
+# Both SIP stacks are getting a NO_CHANGE from EG here and treating that as equivalent to SUCCESS, which seems
+# sane to me. The item is checked in, even if not as part of that transaction. If we try to be technically correct
+# here, what is the SIP client going to do with the information, throw an error? Try again? Best be truthy.
 $test->{fields} = [grep $_->{field} ne FID_PATRON_ID, @{$test->{fields}}];
 
 push @tests, $test;