Bugzilla – Attachment 87343 Details for
Bug 22539
Fines charged on back-dated checkin when item has been renewed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22539: Add regression tests
Bug-22539-Add-regression-tests.patch (text/plain), 2.61 KB, created by
Martin Renvoize
on 2019-04-03 09:37:34 UTC
(
hide
)
Description:
Bug 22539: Add regression tests
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2019-04-03 09:37:34 UTC
Size:
2.61 KB
patch
obsolete
>From 3c686c68f3f0038015879ede43706a77a491eac6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 3 Apr 2019 07:38:36 +0100 >Subject: [PATCH] Bug 22539: Add regression tests > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Circulation.t | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 7cd55479c4..1eaf0e1cde 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1963,16 +1963,17 @@ subtest 'AddReturn | is_overdue' => sub { > is( int($patron->account->balance()), 5, 'AddReturn: pass return_date => overdue' ); > Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber })->delete; > >- # specify dropbox date 5 days before => no overdue >- AddIssue( $patron->unblessed, $item->{barcode}, $five_days_ago ); # date due was 5d ago >- AddReturn( $item->{barcode}, $library->{branchcode}, $ten_days_ago ); >- is( int($patron->account->balance()), 0, 'AddReturn: pass return_date => no overdue' ); >+ # specify dropbox date 5 days later => overdue, adding exemptfine >+ AddIssue( $patron->unblessed, $item->{barcode}, $ten_days_ago ); # date due was 10d ago >+ AddReturn( $item->{barcode}, $library->{branchcode}, 1, $five_days_ago ); >+ is( int($patron->account->balance()), 0, 'AddReturn: pass exemptfine and return_date => no overdue' ); > Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber })->delete; > >- # specify dropbox date 5 days later => overdue, or... not >- AddIssue( $patron->unblessed, $item->{barcode}, $ten_days_ago ); # date due was 10d ago >- AddReturn( $item->{barcode}, $library->{branchcode}, $five_days_ago ); >- is( int($patron->account->balance()), 0, 'AddReturn: pass return_date => no overdue in dropbox mode' ); # FIXME? This is weird, the FU fine is created ( _CalculateAndUpdateFine > C4::Overdues::UpdateFine ) then remove later (in _FixOverduesOnReturn). Looks like it is a feature >+ # specify renewal date one day late, specify return on date due => cancel overdue (bug 22539) >+ AddIssue( $patron->unblessed, $item->{barcode}, $one_day_ago ); # date due was 1d ago >+ AddRenewal( $patron->borrowernumber, $item->{itemnumber}, $library->{branchcode} ); >+ AddReturn( $item->{barcode}, $library->{branchcode}, undef, $one_day_ago ); >+ is( int($patron->account->balance()), 0, 'AddReturn: pass return_date predate renewal => cancel overdue' ); > Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber })->delete; > }; > >-- >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 22539
:
86975
|
86985
|
86986
|
86998
|
86999
|
87341
|
87342
| 87343