@@ -, +, @@ --- t/db_dependent/Koha/Account/Line.t | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) --- a/t/db_dependent/Koha/Account/Line.t +++ a/t/db_dependent/Koha/Account/Line.t @@ -615,7 +615,7 @@ subtest 'checkout() tests' => sub { }; subtest 'credits() and debits() tests' => sub { - plan tests => 10; + plan tests => 12; $schema->storage->txn_begin; @@ -670,6 +670,17 @@ subtest 'credits() and debits() tests' => sub { $debit = $debits->next; is($debit->amount + 0, 12, 'Correct second debit'); + throws_ok + { $debit1->debits; } + 'Koha::Exceptions::Account::IsNotCredit', + 'Exception is thrown when requesting debits linked to debit'; + + throws_ok + { $credit1->credits; } + 'Koha::Exceptions::Account::IsNotDebit', + 'Exception is thrown when requesting credits linked to credit'; + + $schema->storage->txn_rollback; }; --