@@ -, +, @@ # Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10' # at t/db_dependent/Circulation.t line 670. # got: 'auto_too_much_oweing' # expected: 'auto_renew' # Looks like you failed 1 test of 6. prove t/db_dependent/Circulation.t --- t/db_dependent/Circulation.t | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) --- a/t/db_dependent/Circulation.t +++ a/t/db_dependent/Circulation.t @@ -489,10 +489,16 @@ C4::Context->dbh->do("DELETE FROM accountlines"); $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); is ($new_log_size, $old_log_size + 1, 'renew log successfully added'); - - $fine = $schema->resultset('Accountline')->single( { borrowernumber => $renewing_borrower->{borrowernumber}, itemnumber => $itemnumber7 } ); - is( $fine->accounttype, 'F', 'Fine on renewed item is closed out properly' ); - $fine->delete(); + my $fines = Koha::Account::Lines->search( { borrowernumber => $renewing_borrower->{borrowernumber}, itemnumber => $itemnumber7 } ); + if ( C4::Context->preference('finesMode') eq 'production' ) { + is( $fines->count, 2 ); + is( $fines->next->accounttype, 'F', 'Fine on renewed item is closed out properly' ); + is( $fines->next->accounttype, 'F', 'Fine on renewed item is closed out properly' ); + } else { + is( $fines->count, 1 ); + is( $fines->next->accounttype, 'F', 'Fine on renewed item is closed out properly' ); + } + $fines->delete(); t::lib::Mocks::mock_preference('OverduesBlockRenewing','blockitem'); ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber6); --