Bugzilla – Attachment 184143 Details for
Bug 40409
t/db_dependent/Overdues.t generates warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40409: Remove warnings from t/db_dependent/Overdues.t
Bug-40409-Remove-warnings-from-tdbdependentOverdue.patch (text/plain), 1.34 KB, created by
Jonathan Druart
on 2025-07-16 10:35:04 UTC
(
hide
)
Description:
Bug 40409: Remove warnings from t/db_dependent/Overdues.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-16 10:35:04 UTC
Size:
1.34 KB
patch
obsolete
>From 2980b6f17f1e301ac53798ca9457ac6b6230e85e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Jul 2025 12:33:58 +0200 >Subject: [PATCH] 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 >--- > t/db_dependent/Overdues.t | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Overdues.t b/t/db_dependent/Overdues.t >index a65bacbe10b..f17ee28d18e 100755 >--- a/t/db_dependent/Overdues.t >+++ b/t/db_dependent/Overdues.t >@@ -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" ); > >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40409
:
184142
| 184143