Bugzilla – Attachment 74586 Details for
Bug 20562
issue_id is not stored in accountlines for rental fees
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20562: Fix Returns.t test
Bug-20562-Fix-Returnst-test.patch (text/plain), 2.34 KB, created by
Jonathan Druart
on 2018-04-19 19:22:19 UTC
(
hide
)
Description:
Bug 20562: Fix Returns.t test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-04-19 19:22:19 UTC
Size:
2.34 KB
patch
obsolete
>From 9b52e2e79f35ef5355a3aa90b8bcff01c26ba295 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 19 Apr 2018 16:21:57 -0300 >Subject: [PATCH] Bug 20562: Fix Returns.t test > >--- > 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 e97ebe3bde..a8e4ddadbe 100644 >--- a/t/db_dependent/Circulation/Returns.t >+++ b/t/db_dependent/Circulation/Returns.t >@@ -279,7 +279,7 @@ subtest "AddReturn logging on statistics table (item-level_itypes=0)" => sub { > }; > > subtest 'Handle ids duplication' => sub { >- plan tests => 6; >+ plan tests => 8; > > t::lib::Mocks::mock_preference( 'item-level_itypes', 1 ); > t::lib::Mocks::mock_preference( 'CalculateFinesOnReturn', 1 ); >@@ -304,8 +304,12 @@ subtest 'Handle ids duplication' => sub { > $patron = Koha::Patrons->find( $patron->{borrowernumber} ); > > my $original_checkout = AddIssue( $patron->unblessed, $item->{barcode}, dt_from_string->subtract( days => 50 ) ); >- > my $issue_id = $original_checkout->issue_id; >+ my $account_lines = Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber, issue_id => $issue_id }); >+ is( $account_lines->count, 1, '1 account line should exist for this issue_id' ); >+ is( $account_lines->next->description, 'Rental', 'patron has been charged the rentalcharge' ); >+ $account_lines->delete; >+ > # Create an existing entry in old_issue > $builder->build({ source => 'OldIssue', value => { issue_id => $issue_id } }); > >@@ -326,7 +330,7 @@ subtest 'Handle ids duplication' => sub { > is( $messages->{WasReturned}, 0, 'messages should have the WasReturned flag set to 0' ); > is( $messages->{DataCorrupted}, 1, 'messages should have the DataCorrupted flag set to 1' ); > >- my $account_lines = Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber, issue_id => $issue_id }); >+ $account_lines = Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber, issue_id => $issue_id }); > is( $account_lines->count, 0, 'No account lines should exist for this issue_id, patron should not have been charged' ); > > is( Koha::Checkouts->find( $issue_id )->issue_id, $issue_id, 'The issues entry should not have been removed' ); >-- >2.11.0
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 20562
:
74019
|
74020
|
74021
|
74102
|
74240
|
74250
|
74253
|
74584
| 74586