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

(-)a/t/db_dependent/SIP/Message.t (-2 / +38 lines)
Lines 21-27 Link Here
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use Test::More tests => 21;
24
use Test::More tests => 22;
25
use Test::Exception;
25
use Test::Exception;
26
use Test::MockObject;
26
use Test::MockObject;
27
use Test::MockModule;
27
use Test::MockModule;
Lines 492-497 subtest 'Lastseen response patron status' => sub { Link Here
492
492
493
};
493
};
494
494
495
subtest 'Invalid cardnumber test response patron status' => sub {
496
497
    plan tests => 1;
498
499
    my $schema = Koha::Database->new->schema;
500
    $schema->storage->txn_begin;
501
502
    my $builder    = t::lib::TestBuilder->new();
503
    my $branchcode = $builder->build( { source => 'Branch' } )->{branchcode};
504
    my ( $response, $findpatron );
505
    my $mocks      = create_mocks( \$response, \$findpatron, \$branchcode );
506
    my $cardnum    = 'nonexistentcardnumber';
507
    my $sip_patron = C4::SIP::ILS::Patron->new($cardnum);
508
    $findpatron = $sip_patron;
509
510
    my $siprequest =
511
          PATRON_STATUS_REQ
512
        . 'engYYYYMMDDZZZZHHMMSS'
513
        . FID_INST_ID
514
        . $branchcode . '|'
515
        . FID_PATRON_ID
516
        . $cardnum . '|'
517
        . FID_PATRON_PWD
518
        . PATRON_PW . '|';
519
    my $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 );
520
521
    my $server = { ils => $mocks->{ils} };
522
    undef $response;
523
524
    t::lib::Mocks::mock_preference( 'TrackLastPatronActivityTriggers', 'login' );
525
    $msg->handle_patron_status($server);
526
    isnt( $response, undef, 'At least we got a response.' );
527
528
    $schema->storage->txn_rollback;
529
530
};
531
495
subtest "Test build_additional_item_fields_string" => sub {
532
subtest "Test build_additional_item_fields_string" => sub {
496
    my $schema = Koha::Database->new->schema;
533
    my $schema = Koha::Database->new->schema;
497
    $schema->storage->txn_begin;
534
    $schema->storage->txn_begin;
498
- 

Return to bug 38284