Bugzilla – Attachment 132248 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.31 KB, created by
Nick Clemens (kidclamp)
on 2022-03-25 15:18:45 UTC
(
hide
)
Description:
Bug 30362: Unit test
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-03-25 15:18:45 UTC
Size:
1.31 KB
patch
obsolete
>From 5bcdcae9f6c0e4d27258d0d86c83e1313ccda3c5 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 > >--- > 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 7cd2c0d74f..9ce1732816 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -5278,6 +5278,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"' >+ ); > }; > > $schema->storage->txn_rollback; >-- >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