Bugzilla – Attachment 139995 Details for
Bug 31493
Circulation.t fails if "RenewalPeriodBase" is set as "the current date"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31493: Prevent Circulation.t failing on "AddRenewal left both fines"
0001-Bug-31493-Prevent-Circulation.t-failing-on-AddRenewa.patch (text/plain), 1.36 KB, created by
Emmi Takkinen
on 2022-08-31 09:17:59 UTC
(
hide
)
Description:
Bug 31493: Prevent Circulation.t failing on "AddRenewal left both fines"
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2022-08-31 09:17:59 UTC
Size:
1.36 KB
patch
obsolete
>From c2a13cc554eed3baf1ae10f92261158eb13a386f Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Wed, 31 Aug 2022 12:13:25 +0300 >Subject: [PATCH] Bug 31493: Prevent Circulation.t failing on "AddRenewal left > both fines" > >If one has syspref "RenewalPeriodBase" set as "the current date" >Circulation.t tests fail on "AddRenewal left both fines". This causes >one of the test fines to be dropped/charged. Mocking syspref >"RenewalPeriodBase" as "the old due date of the checkout" solves the issue. > >To test: >1. Have syspref "RenewalPeriodBase" set as "the current date". >2. Run prove t/db_dependent/Circulation.t. >=> Tests fail. >3. Apply patch. >4. Run tests again. >=> Tests pass. > >Sponsored-by: Koha-Suomi Oy >--- > t/db_dependent/Circulation.t | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 28c3238301..4ad6cad45a 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -732,6 +732,7 @@ subtest "CanBookBeRenewed tests" => sub { > > # Make sure fine calculation isn't skipped when adding renewal > t::lib::Mocks::mock_preference('CalculateFinesOnReturn', 1); >+ t::lib::Mocks::mock_preference('RenewalPeriodBase', 'date_due'); > > my $staff = $builder->build_object({ class => "Koha::Patrons" }); > t::lib::Mocks::mock_userenv({ patron => $staff }); >-- >2.34.1 >
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 31493
: 139995