add test for hold patron phone checkin response extension
authorJason Etheridge <jason@EquinoxOLI.org>
Sat, 26 Nov 2022 16:53:13 +0000 (11:53 -0500)
committerJason Etheridge <jason@EquinoxOLI.org>
Sat, 26 Nov 2022 16:53:13 +0000 (11:53 -0500)
Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
t/17extensions.t
t/augment_concerto.sql

index 76f1695..9d9b2a5 100755 (executable)
@@ -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 <phone_ext_to_msg10 enabled="true" /> 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();
index 0e56047..6a509ba 100644 (file)
@@ -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);