Bugzilla – Attachment 184278 Details for
Bug 40373
Reserves.t generates a warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40373: Remove warning from Reserves.t
Bug-40373-Remove-warning-from-Reservest.patch (text/plain), 1.71 KB, created by
Marcel de Rooy
on 2025-07-18 06:36:53 UTC
(
hide
)
Description:
Bug 40373: Remove warning from Reserves.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-07-18 06:36:53 UTC
Size:
1.71 KB
patch
obsolete
>From c4e4550fcf09c8685ef6c7b4e03cdba9ad1b927f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 15 Jul 2025 11:20:32 +0200 >Subject: [PATCH] Bug 40373: Remove warning from Reserves.t >Content-Type: text/plain; charset=utf-8 > >t/db_dependent/Reserves.t .. 10/70 No reserves HOLD_CANCELLATION letter transported by email at /kohadevbox/koha/C4/Letters.pm line 602. > >We do not test the notification here, we can simply ignore the letters code. >However we do test it later so we need to limit the scope of mock > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Reserves.t | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index a922452815..cced1feee7 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -17,7 +17,8 @@ > > use Modern::Perl; > >-use Test::More tests => 70; >+use Test::More tests => 71; >+use Test::NoWarnings; > use Test::MockModule; > use Test::Warn; > >@@ -413,7 +414,14 @@ is( > $which_highest->{reserve_id}, $reserve_id, > 'CheckReserves returns higher priority future reserve with sufficient lookahead' > ); >-ModReserve( { reserve_id => $now_reserve_id, rank => 'del', cancellation_reason => 'test reserve' } ); >+ >+{ >+ # Prevent warning 'No reserves HOLD_CANCELLATION letter transported by email' >+ my $mock_letters = Test::MockModule->new('C4::Letters'); >+ $mock_letters->mock( 'GetPreparedLetter', sub { return } ); >+ >+ ModReserve( { reserve_id => $now_reserve_id, rank => 'del', cancellation_reason => 'test reserve' } ); >+} > > # End of tests for bug 9761 (ConfirmFutureHolds) > >-- >2.39.5
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 40373
:
184076
|
184241
| 184278