|
Lines 70-76
subtest 'Testing Patron Status Request V2' => sub {
Link Here
|
| 70 |
|
70 |
|
| 71 |
subtest 'Testing Patron Info Request V2' => sub { |
71 |
subtest 'Testing Patron Info Request V2' => sub { |
| 72 |
$schema->storage->txn_begin; |
72 |
$schema->storage->txn_begin; |
| 73 |
plan tests => 16; |
73 |
plan tests => 17; |
| 74 |
$C4::SIP::Sip::protocol_version = 2; |
74 |
$C4::SIP::Sip::protocol_version = 2; |
| 75 |
test_request_patron_info_v2(); |
75 |
test_request_patron_info_v2(); |
| 76 |
$schema->storage->txn_rollback; |
76 |
$schema->storage->txn_rollback; |
|
Lines 196-201
sub test_request_patron_info_v2 {
Link Here
|
| 196 |
$msg->handle_patron_info( $server ); |
196 |
$msg->handle_patron_info( $server ); |
| 197 |
$respcode = substr( $response, 0, 2 ); |
197 |
$respcode = substr( $response, 0, 2 ); |
| 198 |
check_field( $respcode, $response, FID_VALID_PATRON_PWD, 'N', 'code CQ should be N for empty AD' ); |
198 |
check_field( $respcode, $response, FID_VALID_PATRON_PWD, 'N', 'code CQ should be N for empty AD' ); |
|
|
199 |
# Test empty password is OK if account configured to allow |
| 200 |
$server->{account}->{allow_empty_passwords} = 1; |
| 201 |
$msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); |
| 202 |
undef $response; |
| 203 |
$msg->handle_patron_info( $server ); |
| 204 |
$respcode = substr( $response, 0, 2 ); |
| 205 |
check_field( $respcode, $response, FID_VALID_PATRON_PWD, 'Y', 'code CQ should be Y if empty AD allowed' ); |
| 199 |
|
206 |
|
| 200 |
# Finally, we send a wrong card number |
207 |
# Finally, we send a wrong card number |
| 201 |
$schema->resultset('Borrower')->search({ cardnumber => $card })->delete; |
208 |
$schema->resultset('Borrower')->search({ cardnumber => $card })->delete; |
| 202 |
- |
|
|