Bugzilla – Attachment 168189 Details for
Bug 36128
Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36128: (QA follow-up) Add regression test
Bug-36128-QA-follow-up-Add-regression-test.patch (text/plain), 1.67 KB, created by
Martin Renvoize (ashimema)
on 2024-06-27 09:02:51 UTC
(
hide
)
Description:
Bug 36128: (QA follow-up) Add regression test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-06-27 09:02:51 UTC
Size:
1.67 KB
patch
obsolete
>From f1faad98fdd8b89b170eb67ead9a38a788c209d2 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 27 Jun 2024 10:01:45 +0100 >Subject: [PATCH] Bug 36128: (QA follow-up) Add regression test > >This patch adds a simple regression test to ensure we don't re-introduce >the errant warning. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Overdues.t | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Overdues.t b/t/db_dependent/Overdues.t >index 13da09b3415..af719faf76f 100755 >--- a/t/db_dependent/Overdues.t >+++ b/t/db_dependent/Overdues.t >@@ -1,7 +1,7 @@ > #!/usr/bin/perl; > > use Modern::Perl; >-use Test::More tests => 17; >+use Test::More tests => 18; > use Test::Warn; > > use C4::Context; >@@ -84,6 +84,11 @@ is_deeply( $mtts, ['print', 'sms', 'email'], 'GetOverdueMessageTransportTypes: t > > # Test GetBranchcodesWithOverdueRules > $dbh->do(q|DELETE FROM overduerules|); >+ >+my @overdue_branches; >+warnings_are { @overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules(); } [], >+ "No warnings thrown when no overdue rules exist"; >+ > $dbh->do(q| > INSERT INTO overduerules > ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 ) >@@ -93,7 +98,7 @@ $dbh->do(q| > > my @branchcodes = map { $_->branchcode } Koha::Libraries->search->as_list; > >-my @overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules(); >+@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules(); > is_deeply( [ sort @overdue_branches ], [ sort @branchcodes ], 'If a default rule exists, all branches should be returned' ); > > $dbh->do(q| >-- >2.45.2
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 36128
:
168008
|
168188
| 168189