View | Details | Raw Unified | Return to bug 22016
Collapse All | Expand All

(-)a/t/db_dependent/SIP/Message.t (-2 / +17 lines)
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 => 23;
70
    plan tests => 25;
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 370-375 sub test_checkin_v2 { Link Here
370
    $server->{account}->{checked_in_ok} = 0;
370
    $server->{account}->{checked_in_ok} = 0;
371
    $server->{account}->{cv_send_00_on_success} = 0;
371
    $server->{account}->{cv_send_00_on_success} = 0;
372
372
373
    $server->{account}->{checked_in_ok} = 1;
374
    $server->{account}->{ct_always_send} = 0;
375
    undef $response;
376
    $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 );
377
    $msg->handle_checkin( $server );
378
    $respcode = substr( $response, 0, 2 );
379
    check_field( $respcode, $response, FID_DESTINATION_LOCATION, undef, 'No FID_DESTINATION_LOCATION (CT) field' );
380
    $server->{account}->{ct_always_send} = 1;
381
    undef $response;
382
    $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 );
383
    $msg->handle_checkin( $server );
384
    $respcode = substr( $response, 0, 2 );
385
    check_field( $respcode, $response, FID_DESTINATION_LOCATION, q{}, 'FID_DESTINATION_LOCATION (CT) field is empty but present' );
386
    $server->{account}->{checked_in_ok} = 0;
387
    $server->{account}->{ct_always_send} = 0;
388
373
    # Checkin at wrong branch: issue item and switch branch, and checkin
389
    # Checkin at wrong branch: issue item and switch branch, and checkin
374
    my $issue = Koha::Checkout->new({ branchcode => $branchcode, borrowernumber => $patron1->{borrowernumber}, itemnumber => $item->{itemnumber} })->store;
390
    my $issue = Koha::Checkout->new({ branchcode => $branchcode, borrowernumber => $patron1->{borrowernumber}, itemnumber => $item->{itemnumber} })->store;
375
    $branchcode = $builder->build({ source => 'Branch' })->{branchcode};
391
    $branchcode = $builder->build({ source => 'Branch' })->{branchcode};
376
- 

Return to bug 22016