Bugzilla – Attachment 73656 Details for
Bug 20325
C4::Accounts::purge_zero_balance_fees does not check account_offsets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20325: Do not remove accountlines between tests
Bug-20325-Do-not-remove-accountlines-between-tests.patch (text/plain), 2.95 KB, created by
Jonathan Druart
on 2018-04-04 18:37:21 UTC
(
hide
)
Description:
Bug 20325: Do not remove accountlines between tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-04-04 18:37:21 UTC
Size:
2.95 KB
patch
obsolete
>From e091e690783fc1688afb5ada295bb0650e735ef3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 4 Apr 2018 15:36:46 -0300 >Subject: [PATCH] Bug 20325: Do not remove accountlines between tests > >This is part of the tests, to make sure they have not been deleted >--- > t/db_dependent/Accounts.t | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t >index b843b40fd1..9da6f59733 100644 >--- a/t/db_dependent/Accounts.t >+++ b/t/db_dependent/Accounts.t >@@ -798,7 +798,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { > }; > > subtest "Koha::Account::non_issues_charges tests" => sub { >- plan tests => 6; >+ plan tests => 9; > > my $patron = $builder->build_object( > { >@@ -820,8 +820,8 @@ subtest "Koha::Account::non_issues_charges tests" => sub { > my $credit_2 = Koha::Account::Lines->find( $credit->id ); > ok( $debit_2, 'Debit was correctly not deleted when credit has balance' ); > ok( $credit_2, 'Credit was correctly not deleted when credit has balance' ); >+ is( Koha::Account::Lines->count({ borrowernumber => $patron->id }), 2, "The 2 account lines still exists" ); > >- $dbh->do(q|DELETE FROM accountlines WHERE borrowernumber=?|, undef, $patron->id); > $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 5 })->store(); > $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store(); > $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment' })->store(); >@@ -831,8 +831,8 @@ subtest "Koha::Account::non_issues_charges tests" => sub { > $credit_2 = Koha::Account::Lines->find( $credit->id ); > ok( $debit_2, 'Debit was correctly not deleted when debit has balance' ); > ok( $credit_2, 'Credit was correctly not deleted when debit has balance' ); >+ is( Koha::Account::Lines->count({ borrowernumber => $patron->id }), 2 + 2, "The 2 + 2 account lines still exists" ); > >- $dbh->do(q|DELETE FROM accountlines WHERE borrowernumber=?|, undef, $patron->id); > $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store(); > $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store(); > $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment' })->store(); >@@ -841,6 +841,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { > $credit_2 = Koha::Account::Lines->find( $credit->id ); > ok( !$debit_2, 'Debit was correctly deleted' ); > ok( !$credit_2, 'Credit was correctly deleted' ); >+ is( Koha::Account::Lines->count({ borrowernumber => $patron->id }), 2 + 2, "The 2 + 2 account lines still exists, the last 2 have been deleted ok" ); > }; > > 1; >-- >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 20325
:
73350
|
73516
|
73599
|
73603
|
73655
| 73656 |
73678