Bug 40409: Remove warnings from t/db_dependent/Overdues.t
The tests was wrong, we should make sure the item has been checked in.
We were missing the mock userenv:
Can't use an undefined value as a HASH reference at /kohadevbox/koha/C4/Circulation.pm line 2744. at /kohadevbox/koha/C4/Circulation.pm line 2787
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fdb9a41af3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
9f3c5d2019
commit
eb4e66dbfb
|
|
@ -1,7 +1,8 @@
|
|||
#!/usr/bin/perl;
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More tests => 18;
|
||||
use Test::More tests => 19;
|
||||
use Test::NoWarnings;
|
||||
use Test::Warn;
|
||||
|
||||
use C4::Context;
|
||||
|
|
@ -549,6 +550,7 @@ subtest 'UpdateFine tests' => sub {
|
|||
{ order_by => { '-asc' => 'accountlines_id' } }
|
||||
);
|
||||
is( $fines->count, 4, "New amount should be 0 so no fine added" );
|
||||
t::lib::Mocks::mock_userenv( { patron => $patron_1 } );
|
||||
my @r = C4::Circulation::AddReturn( $item_1->barcode, $item_1->homebranch, 1 );
|
||||
is( $r[1]->{WasReturned}, 1, "Returning the item and forgiving fines succeeds" );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue