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

(-)a/t/db_dependent/SIP/Patron.t (-2 / +7 lines)
Lines 12-17 use t::lib::TestBuilder; Link Here
12
12
13
use C4::SIP::ILS::Patron;
13
use C4::SIP::ILS::Patron;
14
use Koha::Account::Lines;
14
use Koha::Account::Lines;
15
use Koha::Acquisition::Currencies;
15
use Koha::Database;
16
use Koha::Database;
16
use Koha::DateUtils qw( dt_from_string output_pref );
17
use Koha::DateUtils qw( dt_from_string output_pref );
17
use Koha::Patron::Attributes;
18
use Koha::Patron::Attributes;
Lines 35-41 is( $sip_patron2, undef, "Patron is not valid (anymore)" ); Link Here
35
36
36
subtest "new tests" => sub {
37
subtest "new tests" => sub {
37
38
38
    plan tests => 5;
39
    plan tests => 6;
39
40
40
    my $patron = $builder->build( { source => 'Borrower' } );
41
    my $patron = $builder->build( { source => 'Borrower' } );
41
42
Lines 53-58 subtest "new tests" => sub { Link Here
53
    is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron via cardnumber hashref' );
54
    is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron via cardnumber hashref' );
54
    $ils_patron = C4::SIP::ILS::Patron->new( { userid => $userid } );
55
    $ils_patron = C4::SIP::ILS::Patron->new( { userid => $userid } );
55
    is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron via userid hashref' );
56
    is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron via userid hashref' );
57
58
    # Verify that having no active currency does not crash C4::SIP::ILS::Patron::new
59
    Koha::Acquisition::Currencies->get_active->active(0)->store();
60
    $ils_patron = C4::SIP::ILS::Patron->new( { userid => $userid } );
61
    is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron when  no active currency is defined' );
56
};
62
};
57
63
58
subtest "OverduesBlockCirc tests" => sub {
64
subtest "OverduesBlockCirc tests" => sub {
59
- 

Return to bug 39407