Bugzilla – Attachment 107140 Details for
Bug 8338
Add ability to remove fines with dropbox mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8338: (QA follow-up) Fix test for backdated return
Bug-8338-QA-follow-up-Fix-test-for-backdated-retur.patch (text/plain), 1.69 KB, created by
Martin Renvoize (ashimema)
on 2020-07-21 10:19:54 UTC
(
hide
)
Description:
Bug 8338: (QA follow-up) Fix test for backdated return
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-07-21 10:19:54 UTC
Size:
1.69 KB
patch
obsolete
>From b79e5fa9cac8ab9c9ada1d817e51656982908168 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 21 Jul 2020 11:18:16 +0100 >Subject: [PATCH] Bug 8338: (QA follow-up) Fix test for backdated return > >A test for CalculateFinesOnBackdate was introduced since this bug was >written and needed updateing. >--- > t/db_dependent/Circulation/Returns.t | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Circulation/Returns.t b/t/db_dependent/Circulation/Returns.t >index 864f47d79b..5f3576a283 100644 >--- a/t/db_dependent/Circulation/Returns.t >+++ b/t/db_dependent/Circulation/Returns.t >@@ -400,7 +400,7 @@ subtest 'BranchTransferLimitsType' => sub { > }; > > subtest 'Backdated returns should reduce fine if needed' => sub { >- plan tests => 1; >+ plan tests => 3; > > t::lib::Mocks::mock_preference( "CalculateFinesOnReturn", 0 ); > t::lib::Mocks::mock_preference( "CalculateFinesOnBackdate", 1 ); >@@ -434,10 +434,14 @@ subtest 'Backdated returns should reduce fine if needed' => sub { > branchcode => $patron->branchcode, > })->store(); > >+ my $account = $patron->account; >+ is( $account->balance+0, 100, "Account balance before return is 100"); >+ > my ( $doreturn, $messages, $issue ) = AddReturn($item->barcode, undef, undef, dt_from_string('1999-01-01') ); >+ is( $account->balance+0, 0, "Account balance after return is 0"); > >- $fine->discard_changes; >- is( $fine->amountoutstanding+0, 0, "Fine was reduced correctly with a backdated return" ); >+ $fine = $fine->get_from_storage; >+ is( $fine, undef, "Fine was removed correctly with a backdated return" ); > }; > > $schema->storage->txn_rollback; >-- >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 8338
:
104841
|
104842
|
104900
|
104901
|
105496
|
105497
|
105498
|
106152
|
106153
|
106154
|
106155
|
106209
|
106523
|
106524
|
106525
|
106526
|
106527
| 107140 |
110640