Bug 20946: Additional unit tests for 0 lines edge case
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
f097b40000
commit
0b62e10a05
|
|
@ -31,7 +31,7 @@ my $builder = t::lib::TestBuilder->new;
|
|||
|
||||
subtest 'outstanding_debits() tests' => sub {
|
||||
|
||||
plan tests => 5;
|
||||
plan tests => 7;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
|
|
@ -55,5 +55,10 @@ subtest 'outstanding_debits() tests' => sub {
|
|||
$i++;
|
||||
}
|
||||
|
||||
( $total, $lines ) = Koha::Account->new({ patron_id => 'InvalidBorrowernumber' })->outstanding_debits();
|
||||
is( $total, 0, "Total if no outstanding debits is 0" );
|
||||
is( $lines->count, 0, "With no outstanding debits, we get back a Lines object with 0 lines" );
|
||||
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue