Bugzilla – Attachment 153736 Details for
Bug 30362
GetSoonestRenewDate is technically wrong when NoRenewalBeforePrecision set to date soonest renewal is today
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30362: Unit test
Bug-30362-Unit-test.patch (text/plain), 1.38 KB, created by
Sam Lau
on 2023-07-20 16:03:12 UTC
(
hide
)
Description:
Bug 30362: Unit test
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2023-07-20 16:03:12 UTC
Size:
1.38 KB
patch
obsolete
>From bedb53d7fa61e9107be8b5b0bb220e09f5c2342c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 25 Mar 2022 15:18:27 +0000 >Subject: [PATCH] Bug 30362: Unit test > >Signed-off-by: Sam Lau <samalau@gmail.com> >--- > t/db_dependent/Circulation.t | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 1bcf5c0032..7b1e063da3 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -5858,6 +5858,23 @@ subtest "GetSoonestRenewDate tests" => sub { > $datedue, > 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore' > ); >+ >+ t::lib::Mocks::mock_preference( 'NoRenewalBeforePrecision', 'date' ); >+ Koha::CirculationRules->set_rule( >+ { >+ categorycode => undef, >+ branchcode => undef, >+ itemtype => undef, >+ rule_name => 'norenewalbefore', >+ rule_value => 1, >+ } >+ ); >+ $issue->date_due( dt_from_string )->store; >+ is( >+ GetSoonestRenewDate( $patron->id, $item->itemnumber ), >+ dt_from_string->truncate( to => 'day' ), >+ 'Checkouts with auto-renewal can be renewed 1 day before due date if no renewalbefore = 1 and precision = "date"' >+ ); > }; > > subtest "CanBookBeIssued + needsconfirmation message" => sub { >-- >2.30.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 30362
:
132248
|
153694
|
153695
|
153736
|
153737
|
153738
|
154136
|
154137
|
154138
|
154139