my $patron_info_test_template = {
id => 'valid Patron Info no details',
msg => "6300020060329 201700 AO$instid|AA$user_barcode|",
- pat => qr/^64 [ Y]{13}\d{3}$datepat(\d{4}){6}/,
+ pat => qr/^64[ Y]{14}\d{3}$datepat(\d{4}){6}/,
fields => [
$SIPtest::field_specs{(FID_INST_ID) },
$SIPtest::field_specs{(FID_SCREEN_MSG)},
required => 0, },
{ field => FID_HOME_ADDR,
pat => qr/^$user_homeaddr$/o,
- required => 1, }, # required by this test case
+ required => 0, }, # optional in the spec
{ field => FID_EMAIL,
pat => qr/^$user_email$/o,
required => 1, },
{ field => FID_HOME_PHONE,
pat => qr/^$user_phone$/o,
- required => 1, },
+ required => 0, },
{ field => FID_PATRON_BIRTHDATE,
pat => qr/^$user_birthday$/o,
required => 1, },
required => 1, },
{ field => FID_INET_PROFILE,
pat => qr/^$user_inet$/,
- required => 1, },
+ required => 0, }, # this is a custom extension, not required by spec
{ field => FID_HOME_LIBRARY,
pat => qr/^$user_homelib$/,
- required => 1, }, # Required for this test
+ required => 0, }, # this is a custom extension, not required by spec
], };
my @tests = (
$test = clone($patron_info_test_template);
$test->{id} = "invalid Patron Info id";
$test->{msg} =~ s/AA$user_barcode\|/AAbad_barcode|/o;
- $test->{pat} = qr/^64Y[ Y]{13}\d{3}$datepat(\d{4}){6}/;
+ $test->{pat} = qr/^64Y[ NY]{13}\d{3}$datepat(\d{4}){6}/;
delete $test->{fields};
$test->{fields} = [
$SIPtest::field_specs{ (FID_INST_ID) },
$test = clone($patron_info_test_template);
$test->{id} = "valid Patron Info, invalid password";
$test->{msg} .= (FID_PATRON_PWD) . 'badpwd|';
- $test->{pat} = qr/^64[ Y]{14}\d{3}$datepat(\d{4}){6}/;
+ $test->{pat} = qr/^64[ YN]{14}\d{3}$datepat(\d{4}){6}/;
delete $test->{fields};
$test->{fields} = [
$SIPtest::field_specs{ (FID_INST_ID) },