2 # block_patron: test Block Patron Response
10 use C4
::SIP
::Sip
::Constants
qw(:all);
12 use SIPtest
qw(:basic :user1);
14 my $block_patron_test_template = {
15 id
=> 'Block Patron: valid patron, card not retained',
16 msg
=> "01N20060102 084238AO$instid|ALThis card is blocked.|AA$user_barcode|AC$password|",
17 # response to block patron is a patron status message
18 pat
=> qr/^24Y[ Y]{13}000$datepat/,
20 $SIPtest::field_specs
{(FID_INST_ID
)},
21 $SIPtest::field_specs
{(FID_SCREEN_MSG
)},
22 $SIPtest::field_specs
{(FID_PRINT_LINE
)},
23 { field
=> FID_PATRON_ID
,
24 pat
=> qr/^$user_barcode$/o,
26 { field
=> FID_PERSONAL_NAME
,
27 pat
=> qr/^$user_fullname$/o,
29 { field
=> FID_VALID_PATRON
,
31 # Not required by the spec, but by the test
33 $SIPtest::field_specs
{(FID_CURRENCY
)},
34 { field
=> FID_FEE_AMT
,
41 $SIPtest::sc_status_test
,
42 clone
($block_patron_test_template),
45 SIPtest
::run_sip_tests
(@tests);