diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index 4eb549bbd4..b8700293a6 100644 --- a/Koha/Account/Line.pm +++ b/Koha/Account/Line.pm @@ -1035,7 +1035,6 @@ sub renew_item { $self->{branchcode}, undef, undef, - undef, 0 ); return { diff --git a/t/db_dependent/Koha/Account/Line.t b/t/db_dependent/Koha/Account/Line.t index ccf4b21974..fe593ae17b 100755 --- a/t/db_dependent/Koha/Account/Line.t +++ b/t/db_dependent/Koha/Account/Line.t @@ -565,10 +565,10 @@ subtest 'Renewal related tests' => sub { ); my $called = 0; my $module = Test::MockModule->new('C4::Circulation'); + $module->mock('AddRenewal', sub { $called = 1; }); $module->mock('CanBookBeRenewed', sub { return 1; }); $line->renew_item; - my $r = Koha::Checkouts::Renewals->find({ checkout_id => $issue->id }); - is( $r->seen, 0, "RenewAccruingItemWhenPaid triggers an unseen renewal" ); + is( $called, 1, 'Attempt to renew succeeds when conditions are met' ); $schema->storage->txn_rollback; };