Lines 67-73
subtest 'Testing Patron Info Request V2' => sub {
Link Here
|
67 |
subtest 'Checkin V2' => sub { |
67 |
subtest 'Checkin V2' => sub { |
68 |
my $schema = Koha::Database->new->schema; |
68 |
my $schema = Koha::Database->new->schema; |
69 |
$schema->storage->txn_begin; |
69 |
$schema->storage->txn_begin; |
70 |
plan tests => 21; |
70 |
plan tests => 23; |
71 |
$C4::SIP::Sip::protocol_version = 2; |
71 |
$C4::SIP::Sip::protocol_version = 2; |
72 |
test_checkin_v2(); |
72 |
test_checkin_v2(); |
73 |
$schema->storage->txn_rollback; |
73 |
$schema->storage->txn_rollback; |
Lines 354-359
sub test_checkin_v2 {
Link Here
|
354 |
check_field( $respcode, $response, FID_SCREEN_MSG, undef, 'No screen msg' ); |
354 |
check_field( $respcode, $response, FID_SCREEN_MSG, undef, 'No screen msg' ); |
355 |
$server->{account}->{checked_in_ok} = 0; |
355 |
$server->{account}->{checked_in_ok} = 0; |
356 |
|
356 |
|
|
|
357 |
$server->{account}->{checked_in_ok} = 1; |
358 |
$server->{account}->{cv_send_00_on_success} = 0; |
359 |
undef $response; |
360 |
$msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); |
361 |
$msg->handle_checkin( $server ); |
362 |
$respcode = substr( $response, 0, 2 ); |
363 |
check_field( $respcode, $response, FID_ALERT_TYPE, undef, 'No FID_ALERT_TYPE (CV) field' ); |
364 |
$server->{account}->{cv_send_00_on_success} = 1; |
365 |
undef $response; |
366 |
$msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); |
367 |
$msg->handle_checkin( $server ); |
368 |
$respcode = substr( $response, 0, 2 ); |
369 |
check_field( $respcode, $response, FID_ALERT_TYPE, '00', 'FID_ALERT_TYPE (CV) field is 00' ); |
370 |
$server->{account}->{checked_in_ok} = 0; |
371 |
$server->{account}->{cv_send_00_on_success} = 0; |
372 |
|
357 |
# Checkin at wrong branch: issue item and switch branch, and checkin |
373 |
# Checkin at wrong branch: issue item and switch branch, and checkin |
358 |
my $issue = Koha::Checkout->new({ branchcode => $branchcode, borrowernumber => $patron1->{borrowernumber}, itemnumber => $item->{itemnumber} })->store; |
374 |
my $issue = Koha::Checkout->new({ branchcode => $branchcode, borrowernumber => $patron1->{borrowernumber}, itemnumber => $item->{itemnumber} })->store; |
359 |
$branchcode = $builder->build({ source => 'Branch' })->{branchcode}; |
375 |
$branchcode = $builder->build({ source => 'Branch' })->{branchcode}; |
360 |
- |
|
|