From 83d0e9916caf94639e21a55121ce8f059e7cc96d Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Sat, 26 Nov 2022 11:53:13 -0500 Subject: [PATCH] add test for hold patron phone checkin response extension Signed-off-by: Jason Etheridge --- t/17extensions.t | 13 ++++++++++++- t/augment_concerto.sql | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/t/17extensions.t b/t/17extensions.t index 76f1695..9d9b2a5 100755 --- a/t/17extensions.t +++ b/t/17extensions.t @@ -293,7 +293,7 @@ sub create_maybe_deprecated_extension_tests { $test = clone($checkin_test_template); $test->{msg} =~ s/$item_barcode/$item3_on_hold_barcode_for_br1/g; $test->{pat} = qr/^101YN[YN]$datepat/o; # let alert field in leader be Y or N - $test->{id} = "Checkin response hold patron ID extension"; + $test->{id} = "Checkin response hold patron name extension"; # No need to check this out, we're just interested in hold routing being triggered push @{$test->{fields}}, { field => FID_HOLD_PATRON_NAME, @@ -301,6 +301,17 @@ sub create_maybe_deprecated_extension_tests { just_warn => 1, required => 1, }; push @tests, $test; + # in SIPServer, add to config to test this + $test = clone($checkin_test_template); + $test->{msg} =~ s/$item_barcode/$item3_on_hold_barcode_for_br1/g; + $test->{pat} = qr/^101YN[YN]$datepat/o; # let alert field in leader be Y or N + $test->{id} = "Checkin response hold patron phone extension"; + # No need to check this out, we're just interested in hold routing being triggered + push @{$test->{fields}}, { + field => FID_HOME_PHONE, + pat => qr/^555-5555$/o, + just_warn => 1, required => 1, }; + push @tests, $test; } create_patron_info_extension_tests(); diff --git a/t/augment_concerto.sql b/t/augment_concerto.sql index 0e56047..6a509ba 100644 --- a/t/augment_concerto.sql +++ b/t/augment_concerto.sql @@ -36,7 +36,7 @@ INSERT INTO asset.stat_cat_entry_copy_map (stat_cat, stat_cat_entry, owning_copy INSERT INTO action.hold_transit_copy (source_send_time, target_copy, source, dest, copy_status, persistant_transfer, hold) VALUES (NOW(), 317, 4, 9, 0, 'f', 158); -UPDATE action.hold_request SET pickup_lib = 4, request_lib = 4, selection_ou = 4 WHERE id = 254; +UPDATE action.hold_request SET phone_notify = '555-5555', pickup_lib = 4, request_lib = 4, selection_ou = 4 WHERE id = 254; UPDATE asset.copy SET circ_lib = 4 WHERE id = 485; INSERT INTO action.hold_copy_map (hold, target_copy, proximity) VALUES (254, 485, 0); -- 2.11.0