Bugzilla – Attachment 119275 Details for
Bug 28097
t/db_dependent/Koha/Account/Line.t test fails with FinesMode set to calculate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28097: Mock finesModes to disable recalculation
Bug-28097-Mock-finesModes-to-disable-recalculation.patch (text/plain), 1.83 KB, created by
Martin Renvoize (ashimema)
on 2021-04-07 11:13:43 UTC
(
hide
)
Description:
Bug 28097: Mock finesModes to disable recalculation
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-07 11:13:43 UTC
Size:
1.83 KB
patch
obsolete
>From 8534469c67f5fb85c9f7f96554439e3cf057d6d6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 7 Apr 2021 12:10:38 +0100 >Subject: [PATCH] Bug 28097: Mock finesModes to disable recalculation > >Since bug 8338 the recalcuated zero amount fine is subsequently removed >in _FixOverduesOnReturn which causes this test to fail if finesMode is >'production' and 'CalculateFinesOnReturn' is enabled. > >Perhaps we should be 'VOID'ing fines rather than completely deleting >them, but that's a question for another day. > >Test plan >1/ Enable finesMode in the staff client >2/ Run the test and watch it fail >3/ Apply the patch >4/ Run the test and watch it pass >--- > t/db_dependent/Koha/Account/Line.t | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/t/db_dependent/Koha/Account/Line.t b/t/db_dependent/Koha/Account/Line.t >index 4a18526dac..4048db9942 100755 >--- a/t/db_dependent/Koha/Account/Line.t >+++ b/t/db_dependent/Koha/Account/Line.t >@@ -594,12 +594,17 @@ subtest 'checkout() tests' => sub { > item_id => $item->itemnumber, > issue_id => $checkout->issue_id, > type => 'OVERDUE', >+ status => 'UNRETURNED' > }); > > my $line_checkout = $line->checkout; > is( ref($line_checkout), 'Koha::Checkout', 'Result type is correct' ); > is( $line_checkout->issue_id, $checkout->issue_id, 'Koha::Account::Line->checkout should return the correct checkout'); > >+ # Prevent re-calculation of fines at check-in for the test; Since bug 8338 the recalculation would result in a '0' >+ # fine which would subsequently be removed by _FixOverduesOnReturn >+ t::lib::Mocks::mock_preference( 'finesMode', 'off' ); >+ > my ( $returned, undef, $old_checkout) = C4::Circulation::AddReturn( $item->barcode, $library->branchcode ); > is( $returned, 1, 'The item should have been returned' ); > >-- >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 28097
:
119275
|
119276