From 54dfe6c8cb1a45d54fd33fce9f2f11ba44873c35 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 18 Jun 2021 15:11:31 +0000 Subject: [PATCH] Bug 22435: (QA follow-up) Fix test file and adjust test Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Koha/Account/Line.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/Account/Line.t b/t/db_dependent/Koha/Account/Line.t index c1dfc23f0e..ce1e8fea4f 100755 --- a/t/db_dependent/Koha/Account/Line.t +++ b/t/db_dependent/Koha/Account/Line.t @@ -220,7 +220,7 @@ subtest 'apply() tests' => sub { is( $offsets->count, 1, 'Only one offset is generated' ); my $THE_offset = $offsets->next; is( $THE_offset->amount * 1, -10, 'Amount was calculated correctly (less than the available credit)' ); - is( $THE_offset->type, 'Manual Credit', 'Passed type stored correctly' ); + is( $THE_offset->type, 'APPLY', 'Passed type stored correctly' ); $debits = Koha::Account::Lines->search({ accountlines_id => $debit_2->id }); $credit = $credit->apply( { debits => [ $debits->as_list ] } ); @@ -266,7 +266,7 @@ subtest 'apply() tests' => sub { $debits = Koha::Account::Lines->search({ accountlines_id => { -in => [ $debit_1->id, $debit_2->id, $debit_3->id, $credit->id ] } }); throws_ok { - $credit_2->apply( { debits => [ $debits->as_list ] } + $credit_2->apply( { debits => [ $debits->as_list ] }); } 'Koha::Exceptions::Account::IsNotDebit', '->apply() rolls back if any of the passed lines is not a debit'; -- 2.20.1