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:
Kyle M Hall 2018-06-26 13:20:26 +00:00 committed by Martin Renvoize
parent f097b40000
commit 0b62e10a05
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 6 additions and 1 deletions

View File

@ -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;
};