From d12c871eb743ddc6fb47ae835655f7428f9f69ea Mon Sep 17 00:00:00 2001 From: djfiander Date: Thu, 3 Aug 2006 00:05:41 +0000 Subject: [PATCH] Use correct boolean format for 'OK' field of Checkin Response message. --- Sip/MsgType.pm | 2 +- t/03checkout.t | 2 +- t/08checkin.t | 4 ++-- t/09renew.t | 2 +- t/10renew_all.t | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index 98a7e49..1e30a65 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -654,7 +654,7 @@ sub handle_checkin { $patron = $status->patron; $item = $status->item; - $resp .= $status->ok ? 'Y' : 'N'; + $resp .= $status->ok ? '1' : '0'; $resp .= $status->resensitize ? 'Y' : 'N'; if ($item && $ils->supports('magnetic media')) { $resp .= sipbool($item->magnetic); diff --git a/t/03checkout.t b/t/03checkout.t index a214420..1d4c1f1 100644 --- a/t/03checkout.t +++ b/t/03checkout.t @@ -27,7 +27,7 @@ my $patron_disable_template = { my $checkin_template = { id => 'Checkout: cleanup: check in item', msg => "09N20050102 08423620060113 084235APUnder the bed|AO$instid|AB$item_barcode|ACterminal password|", - pat => qr/^10YYNN$datepat/o, + pat => qr/^101YNN$datepat/o, fields => [], }; diff --git a/t/08checkin.t b/t/08checkin.t index bb5d223..fd63f29 100644 --- a/t/08checkin.t +++ b/t/08checkin.t @@ -13,7 +13,7 @@ use SIPtest qw($datepat $textpat $instid $user_barcode my $checkin_test_template = { id => 'Checkin: Item is checked out', msg => "09N20060102 08423620060113 084235APUnder the bed|AO$instid|AB$item_barcode|ACterminal password|", - pat => qr/^10YYNN$datepat/o, + pat => qr/^101YNN$datepat/o, fields => [ $SIPtest::field_specs{(FID_INST_ID)}, $SIPtest::field_specs{(FID_SCREEN_MSG)}, @@ -53,7 +53,7 @@ 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/^10NYNN$datepat/o; +$test->{pat} = qr/^100YNN$datepat/o; $test->{fields} = [grep $_->{field} ne FID_PATRON_ID, @{$test->{fields}}]; push @tests, $test; diff --git a/t/09renew.t b/t/09renew.t index 4c37ecc..d756303 100644 --- a/t/09renew.t +++ b/t/09renew.t @@ -20,7 +20,7 @@ my $checkout_template = { my $checkin_template = { id => 'Renew: prep: check in item', msg => "09N20060102 08423620060113 084235APUnder the bed|AO$instid|AB$item_barcode|ACterminal password|", - pat => qr/^10YYNN$datepat/, + pat => qr/^101YNN$datepat/, fields => [], }; diff --git a/t/10renew_all.t b/t/10renew_all.t index 5be0457..2cf6ee5 100644 --- a/t/10renew_all.t +++ b/t/10renew_all.t @@ -31,11 +31,11 @@ my @checkout_templates = ( my @checkin_templates = ( { id => "Renew All: prep: check in $item_barcode", msg => "09N20060102 08423620060113 084235APUnder the bed|AO$instid|AB$item_barcode|ACterminal password|", - pat => qr/^10YYNN$datepat/, + pat => qr/^101YNN$datepat/, fields => [],}, { id => "Renew All: prep: check in $item2_barcode", msg => "09N20060102 08423620060113 084235APUnder the bed|AO$instid|AB$item2_barcode|ACterminal password|", - pat => qr/^10YYNN$datepat/, + pat => qr/^101YNN$datepat/, fields => [],} ); -- 2.11.0