Bugzilla – Attachment 103235 Details for
Bug 25127
Fines with an amountoutstanding of 0 can be created due to maxFine but cannot be forgiven
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25127: Correction to tests
Bug-25127-Correction-to-tests.patch (text/plain), 3.86 KB, created by
Martin Renvoize (ashimema)
on 2020-04-20 08:34:54 UTC
(
hide
)
Description:
Bug 25127: Correction to tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-04-20 08:34:54 UTC
Size:
3.86 KB
patch
obsolete
>From 6a465c48270f5d1e865601ce6d7085bc86b4a97b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 20 Apr 2020 09:34:19 +0100 >Subject: [PATCH] Bug 25127: Correction to tests > >--- > t/db_dependent/Overdues.t | 65 +++++++++++++++++++++++++++++++-------- > 1 file changed, 53 insertions(+), 12 deletions(-) > >diff --git a/t/db_dependent/Overdues.t b/t/db_dependent/Overdues.t >index 12c1cceaa9..d4cab1c16f 100644 >--- a/t/db_dependent/Overdues.t >+++ b/t/db_dependent/Overdues.t >@@ -144,13 +144,13 @@ subtest 'UpdateFine tests' => sub { > my $checkout1 = $builder->build_object( > { > class => 'Koha::Checkouts', >- value => { itemnumber => $item1->itemnumber } >+ value => { itemnumber => $item1->itemnumber, borrowernumber => $patron->id } > } > ); > my $checkout2 = $builder->build_object( > { > class => 'Koha::Checkouts', >- value => { itemnumber => $item2->itemnumber } >+ value => { itemnumber => $item2->itemnumber, borrowernumber => $patron->id } > } > ); > >@@ -431,26 +431,67 @@ subtest 'UpdateFine tests' => sub { > is( $fine3->amountoutstanding+0, 10, "Third fine amount outstanding is reduced" ); > > t::lib::Mocks::mock_preference( 'MaxFine', '7.2' ); >- my $patron_1 = $builder->build_object( { class => 'Koha::Patrons' } ); >- my $account = $patron_1->account; >- $account->add_debit({ type => 'OVERDUE', amount => '6.99', interface => 'TEST'}); >- $account->add_debit({ type => 'OVERDUE', amount => '.10', interface => 'TEST'}); >- $account->add_debit({ type => 'OVERDUE', amount => '.10', interface => 'TEST'}); >- $account->add_debit({ type => 'OVERDUE', amount => '.01', interface => 'TEST'}); >+ my $patron_1 = $builder->build_object( { class => 'Koha::Patrons' } ); > my $item_1 = $builder->build_sample_item(); >+ my $item_2 = $builder->build_sample_item(); > my $checkout_1 = $builder->build_object( > { > class => 'Koha::Checkouts', >- value => { itemnumber => $item_1->itemnumber, borrowernumber => $patron_1->id } >+ value => { >+ itemnumber => $item_1->itemnumber, >+ borrowernumber => $patron_1->id >+ } >+ } >+ ); >+ my $checkout_2 = $builder->build_object( >+ { >+ class => 'Koha::Checkouts', >+ value => { >+ itemnumber => $item_2->itemnumber, >+ borrowernumber => $patron->id >+ } >+ } >+ ); >+ my $account = $patron_1->account; >+ $account->add_debit( >+ { >+ type => 'OVERDUE', >+ amount => '6.99', >+ issue_id => $checkout_1->issue_id, >+ interface => 'TEST' >+ } >+ ); >+ $account->add_debit( >+ { >+ type => 'OVERDUE', >+ amount => '.10', >+ issue_id => $checkout_1->issue_id, >+ interface => 'TEST' >+ } >+ ); >+ $account->add_debit( >+ { >+ type => 'OVERDUE', >+ amount => '.10', >+ issue_id => $checkout_1->issue_id, >+ interface => 'TEST' >+ } >+ ); >+ $account->add_debit( >+ { >+ type => 'OVERDUE', >+ amount => '.01', >+ issue_id => $checkout_1->issue_id, >+ interface => 'TEST' > } > ); > UpdateFine( > { >- issue_id => $checkout_1->issue_id, >- itemnumber => $item_1->itemnumber, >+ issue_id => $checkout_2->issue_id, >+ itemnumber => $item_2->itemnumber, > borrowernumber => $patron_1->borrowernumber, > amount => '.1', >- due => $checkout_1->date_due >+ due => $checkout_2->date_due > } > ); > $fines = Koha::Account::Lines->search( >-- >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 25127
:
102826
|
103235
|
103249
|
103253
|
103276
|
103325
|
103326
|
103327
|
103430
|
103431
|
103432
|
104078
|
104079
|
104080