Bugzilla – Attachment 104752 Details for
Bug 25417
Backdating returns and forgiving fines causes and internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25417: (QA follow-up) Clarify _FixOverduesOnReturn test
Bug-25417-QA-follow-up-Clarify-FixOverduesOnReturn.patch (text/plain), 2.29 KB, created by
Kyle M Hall
on 2020-05-12 11:03:27 UTC
(
hide
)
Description:
Bug 25417: (QA follow-up) Clarify _FixOverduesOnReturn test
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2020-05-12 11:03:27 UTC
Size:
2.29 KB
patch
obsolete
>From a757c6851163fd1c13f2dbd424e283b2e3e914b7 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 11 May 2020 21:13:47 +0100 >Subject: [PATCH] Bug 25417: (QA follow-up) Clarify _FixOverduesOnReturn test > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/Circulation.t | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index d769a67d1f..d75811062c 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -2827,7 +2827,7 @@ subtest '_FixAccountForLostAndFound' => sub { > }; > > subtest '_FixOverduesOnReturn' => sub { >- plan tests => 12; >+ plan tests => 14; > > my $manager = $builder->build_object({ class => "Koha::Patrons" }); > t::lib::Mocks::mock_userenv({ patron => $manager, branchcode => $manager->branchcode }); >@@ -2891,8 +2891,8 @@ subtest '_FixOverduesOnReturn' => sub { > is( ref $credit, "Koha::Account::Line", "Found matching credit for fine forgiveness" ); > is( $credit->amount + 0, -99, "Credit amount is set correctly" ); > is( $credit->amountoutstanding + 0, 0, "Credit amountoutstanding is correctly set to 0" ); >- $offset->delete; > >+ # Bug 25417 - Only forgive fines where there is an amount oustanding to forgive > $accountline->set( > { > debit_type_code => 'OVERDUE', >@@ -2900,12 +2900,15 @@ subtest '_FixOverduesOnReturn' => sub { > amountoutstanding => 0.00, > } > )->store(); >+ $offset->delete; > > C4::Circulation::_FixOverduesOnReturn( $patron->{borrowernumber}, $item->itemnumber, 1, 'RETURNED' ); > > $accountline->_result()->discard_changes(); > $offset = Koha::Account::Offsets->search({ debit_id => $accountline->id, type => 'Forgiven' })->next(); > is( $offset, undef, "No offset created when trying to forgive fine with no outstanding balance" ); >+ isnt( $accountline->status, 'UNRETURNED', 'Open fine ( account type OVERDUE ) has been closed out ( status not UNRETURNED )'); >+ is( $accountline->status, 'RETURNED', 'Passed status has been used to set as RETURNED )'); > }; > > subtest '_FixAccountForLostAndFound returns undef if patron is deleted' => sub { >-- >2.24.2 (Apple Git-127)
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 25417
:
104535
|
104536
|
104575
|
104576
|
104578
|
104579
|
104580
|
104644
|
104645
|
104715
|
104716
|
104730
|
104731
|
104732
|
104733
|
104734
|
104735
|
104736
|
104737
|
104738
|
104739
|
104749
|
104750
|
104751
| 104752 |
104753
|
104754