Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
};
subtest 'credits() and debits() tests' => sub {
- plan tests => 10;
+ plan tests => 12;
$schema->storage->txn_begin;
$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;
};