From: Jason Etheridge Date: Wed, 11 May 2022 17:39:40 +0000 (-0400) Subject: sticking to the SIP2 spec for now X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c938e14c87b887e3b06834d630c15df80c9a1c97;p=working%2FSIPServer.git sticking to the SIP2 spec for now --- diff --git a/t/02patron_info.t b/t/02patron_info.t index 10d2e8b..58853e0 100755 --- a/t/02patron_info.t +++ b/t/02patron_info.t @@ -38,7 +38,7 @@ use SIPtest qw($datepat $textpat $instid $currency $user_barcode $user_pin 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)}, @@ -65,13 +65,13 @@ my $patron_info_test_template = { 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, }, @@ -80,10 +80,10 @@ my $patron_info_test_template = { 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 = ( @@ -140,7 +140,7 @@ sub create_invalid_patron_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) }, @@ -165,7 +165,7 @@ sub create_invalid_patron_tests { $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) },