Bugzilla – Attachment 188524 Details for
Bug 37966
When overriding a hold to renew a book the due date becomes "now" if not specified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37966: Add test coverage for AddRenewal with empty due date
0001-Bug-37966-Add-test-coverage-for-AddRenewal-with-empt.patch (text/plain), 1.83 KB, created by
Michael Hafen
on 2025-10-28 18:21:57 UTC
(
hide
)
Description:
Bug 37966: Add test coverage for AddRenewal with empty due date
Filename:
MIME Type:
Creator:
Michael Hafen
Created:
2025-10-28 18:21:57 UTC
Size:
1.83 KB
patch
obsolete
>From 9cbe682aa4c688b624e42af7933f10db0d17a926 Mon Sep 17 00:00:00 2001 >From: Michael Hafen <michael.hafen@washk12.org> >Date: Tue, 28 Oct 2025 12:19:27 -0600 >Subject: [PATCH] Bug 37966: Add test coverage for AddRenewal with empty due > date >Content-Type: text/plain; charset="utf-8" > >--- > t/db_dependent/Circulation/issue.t | 35 +++++++++++++++++++++++++++++- > 1 file changed, 34 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index e57a09ebbb..602b3758c9 100755 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -18,7 +18,7 @@ > use Modern::Perl; > > use Test::NoWarnings; >-use Test::More tests => 68; >+use Test::More tests => 69; > use DateTime::Duration; > > use t::lib::Mocks; >@@ -421,6 +421,39 @@ is_deeply( > "With issuing rules (renewal allowed, 1 remaining) and with a valid parameter, Getrenewcount of item1 returns 0 renews left" > ); > >+# Check renewal due date when parameter due date is defined but empty >+Koha::CirculationRules->set_rules( >+ { >+ categorycode => undef, >+ itemtype => undef, >+ branchcode => undef, >+ rules => { >+ renewalsallowed => 4, >+ } >+ } >+); >+my $datedue4 = AddRenewal( >+ { >+ borrowernumber => $borrower_id1, >+ itemnumber => $item_id1, >+ branch => $branchcode_1, >+ datedue => "", >+ lastreneweddate => $daysago10 >+ } >+); >+my $datedue4_date = output_pref( >+ { >+ dt => $datedue4, >+ dateformat => 'iso', >+ timeformat => '24hr', >+ dateonly => 1 >+ } >+); >+ok( >+ $datedue4_date ne $today, >+ q{AddRenewal with a defined but empty due date does not set the due date to today} >+); >+ > $dbh->do("DELETE FROM old_issues"); > AddReturn($barcode_1); > my $return = >-- >2.43.0 >
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 37966
:
171790
|
179490
|
180478
| 188524