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

(-)a/t/db_dependent/SIP/ILS.t (-2 / +22 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Test::More tests => 11;
23
use Test::More tests => 12;
24
24
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
use t::lib::Mocks;
26
use t::lib::Mocks;
Lines 174-177 subtest checkout => sub { Link Here
174
    is( $checkout->renewals, 1, "Renewals has been reduced");
174
    is( $checkout->renewals, 1, "Renewals has been reduced");
175
};
175
};
176
176
177
subtest renew_all => sub {
178
    plan tests => 1;
179
180
    my $library = $builder->build_object ({ class => 'Koha::Libraries' });
181
    my $patron = $builder->build_object(
182
        {
183
            class => 'Koha::Patrons',
184
            value => {
185
                branchcode => $library->branchcode,
186
            }
187
        }
188
    );
189
    t::lib::Mocks::mock_userenv({ branchcode => $library->branchcode, flags => 1 });
190
191
    my $ils = C4::SIP::ILS->new({ id => $library->branchcode });
192
193
    # Send empty AD segments (i.e. empty string for patron_pwd)
194
    my $transaction = $ils->renew_all( $patron->cardnumber, "", undef );
195
    isnt( $transaction->{screen_msg}, 'Invalid patron password.', "Empty password succeeds" );
196
};
197
177
$schema->storage->txn_rollback;
198
$schema->storage->txn_rollback;
178
- 

Return to bug 27600