Bugzilla – Attachment 94743 Details for
Bug 23382
Issuing rules failing after bug 20912
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23382: (follow-up) Ensure closed day is inside charge window
Bug-23382-follow-up-Ensure-closed-day-is-inside-ch.patch (text/plain), 2.24 KB, created by
Martin Renvoize (ashimema)
on 2019-10-25 10:31:33 UTC
(
hide
)
Description:
Bug 23382: (follow-up) Ensure closed day is inside charge window
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-25 10:31:33 UTC
Size:
2.24 KB
patch
obsolete
>From 7355083e7231520ad5662c30e77499cac3d04edc Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 25 Oct 2019 11:29:58 +0100 >Subject: [PATCH] Bug 23382: (follow-up) Ensure closed day is inside charge > window > >We're testing with an hourly loan of 96 hours to catch a closed day. >However, our closed day was hard coded to be a Wednesday so if you ran >the tests on a Friday the 96 hour loan would not catch a Wednesday. >--- > t/db_dependent/Koha/Charges/Fees.t | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Charges/Fees.t b/t/db_dependent/Koha/Charges/Fees.t >index 3a14add799..b67b552f42 100644 >--- a/t/db_dependent/Koha/Charges/Fees.t >+++ b/t/db_dependent/Koha/Charges/Fees.t >@@ -338,14 +338,16 @@ subtest 'accumulate_rentalcharge tests' => sub { > ); > > my $calendar = C4::Calendar->new( branchcode => $library->id ); >+ my $day = $dt_from->day_of_week + 1; > $calendar->insert_week_day_holiday( >- weekday => 3, >+ weekday => $day, > title => 'Test holiday', > description => 'Test holiday' > ); > $charge = $fees->accumulate_rentalcharge(); >+ my $dayname = $dt_from->clone->add( days => 1 )->day_name; > is( $charge, 5.00, >-'Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays' >+"Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed $dayname" > ); > > # Hourly tests >@@ -379,10 +381,10 @@ subtest 'accumulate_rentalcharge tests' => sub { > t::lib::Mocks::mock_preference( 'finesCalendar', 'noFinesWhenClosed' ); > $charge = $fees->accumulate_rentalcharge(); > is( $charge, 18.00, >-'Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays (96h - 24h * 0.25u)' >+"Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed $dayname (96h - 24h * 0.25u)" > ); > >- $calendar->delete_holiday( weekday => 3); >+ $calendar->delete_holiday( weekday => $day ); > $charge = $fees->accumulate_rentalcharge(); > is( $charge, 24.00, 'Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed (96h - 0h * 0.25u)' ); > }; >-- >2.20.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 23382
:
92221
|
92222
|
92236
|
92237
|
92238
|
92273
|
92274
|
92275
|
92276
|
93407
|
93408
|
93409
|
93410
|
93411
|
93412
|
94281
|
94282
|
94283
|
94284
|
94285
|
94286
|
94287
|
94288
|
94289
|
94723
|
94724
|
94725
|
94726
|
94727
|
94728
|
94729
|
94730
|
94731
|
94743
|
94755
|
94756
|
94757
|
94758
|
94759
|
94760
|
94761
|
94762
|
94763
|
94764
|
94765
|
94766
|
94774
|
94775
|
94776
|
94777
|
94778
|
94779
|
94780
|
94781
|
94782
|
94783
|
94784
|
107456
|
107457