Bugzilla – Attachment 94169 Details for
Bug 23805
Add a dedicated credit_types table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23805: Update accounttype references in tests
Bug-23805-Update-accounttype-references-in-tests.patch (text/plain), 6.07 KB, created by
Martin Renvoize (ashimema)
on 2019-10-15 11:05:39 UTC
(
hide
)
Description:
Bug 23805: Update accounttype references in tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-15 11:05:39 UTC
Size:
6.07 KB
patch
obsolete
>From 3e751ac8ee9abe346f77ffc0742eb80d6bca12e4 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 14 Oct 2019 11:42:57 +0100 >Subject: [PATCH] Bug 23805: Update accounttype references in tests > >--- > t/db_dependent/Accounts.t | 2 +- > t/db_dependent/Circulation.t | 6 +++--- > t/db_dependent/ILSDI_Services.t | 2 +- > t/db_dependent/Koha/Account.t | 4 ++-- > t/db_dependent/Koha/Account/Lines.t | 2 +- > 5 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t >index 4e93b9e85b..f0a822db2a 100644 >--- a/t/db_dependent/Accounts.t >+++ b/t/db_dependent/Accounts.t >@@ -374,7 +374,7 @@ subtest "Koha::Account::pay writeoff tests" => sub { > > my $writeoff = Koha::Account::Lines->find( $id ); > >- is( $writeoff->accounttype, 'W', 'Type is correct for writeoff' ); >+ is( $writeoff->credit_type_code, 'W', 'Type is correct for writeoff' ); > is( $writeoff->description, 'Writeoff', 'Description is correct' ); > is( $writeoff->amount, '-42.000000', 'Amount is correct' ); > }; >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index b93fd50cd1..66b20376ef 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -2219,7 +2219,7 @@ subtest '_FixAccountForLostAndReturned' => sub { > my $credit_return_id = C4::Circulation::_FixAccountForLostAndReturned( $item->itemnumber, $patron->id ); > my $credit_return = Koha::Account::Lines->find($credit_return_id); > >- is( $credit_return->accounttype, 'LOST_RETURN', 'An account line of type LOST_RETURN is added' ); >+ is( $credit_return->credit_type_code, 'LOST_RETURN', 'An account line of type LOST_RETURN is added' ); > is( $credit_return->amount + 0, > -99.00, 'The account line of type LOST_RETURN has an amount of -99' ); > is( $credit_return->amountoutstanding + 0, >@@ -2277,7 +2277,7 @@ subtest '_FixAccountForLostAndReturned' => sub { > my $credit_return_id = C4::Circulation::_FixAccountForLostAndReturned( $item->itemnumber, $patron->id ); > my $credit_return = Koha::Account::Lines->find($credit_return_id); > >- is( $credit_return->accounttype, 'LOST_RETURN', 'An account line of type LOST_RETURN is added' ); >+ is( $credit_return->credit_type_code, 'LOST_RETURN', 'An account line of type LOST_RETURN is added' ); > is( $credit_return->amount + 0, -99.00, 'The account line of type LOST_RETURN has an amount of -99' ); > is( $credit_return->amountoutstanding + 0, 0, 'The account line of type LOST_RETURN has an amountoutstanding of 0' ); > >@@ -2371,7 +2371,7 @@ subtest '_FixAccountForLostAndReturned' => sub { > 'LOST', 'Lost fee now still has account type of LOST' ); > is( $lost_fee_line->status, 'RETURNED', "Lost fee now has account status of RETURNED"); > >- is( $credit_return->accounttype, 'LOST_RETURN', 'An account line of type LOST_RETURN is added' ); >+ is( $credit_return->credit_type_code, 'LOST_RETURN', 'An account line of type LOST_RETURN is added' ); > is( $credit_return->amount + 0, > ($payment_amount + $outstanding ) * -1, > 'The account line of type LOST_RETURN has an amount equal to the payment + outstanding' >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index b1288ec469..acd1828f19 100644 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -200,7 +200,7 @@ subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes > source => 'Accountline', > value => { > borrowernumber => $brwr->{borrowernumber}, >- accounttype => 'xxx', >+ credit_type_code => 'Pay', > amountoutstanding => 10 > } > } >diff --git a/t/db_dependent/Koha/Account.t b/t/db_dependent/Koha/Account.t >index 568cbf283e..a357a3e348 100755 >--- a/t/db_dependent/Koha/Account.t >+++ b/t/db_dependent/Koha/Account.t >@@ -201,7 +201,7 @@ subtest 'add_credit() tests' => sub { > is( $account->balance, -25, 'Patron has a balance of -25' ); > is( $schema->resultset('ActionLog')->count(), $action_logs + 0, 'No log was added' ); > is( $schema->resultset('Statistic')->count(), $statistics + 1, 'Action added to statistics' ); >- is( $line_1->accounttype, $Koha::Account::account_type_credit->{'payment'}, 'Account type is correctly set' ); >+ is( $line_1->credit_type_code, $Koha::Account::account_type_credit->{'payment'}, 'Account type is correctly set' ); > > # Enable logs > t::lib::Mocks::mock_preference( 'FinesLog', 1 ); >@@ -219,7 +219,7 @@ subtest 'add_credit() tests' => sub { > is( $account->balance, -62, 'Patron has a balance of -25' ); > is( $schema->resultset('ActionLog')->count(), $action_logs + 1, 'Log was added' ); > is( $schema->resultset('Statistic')->count(), $statistics + 2, 'Action added to statistics' ); >- is( $line_2->accounttype, $Koha::Account::account_type_credit->{'payment'}, 'Account type is correctly set' ); >+ is( $line_2->credit_type_code, $Koha::Account::account_type_credit->{'payment'}, 'Account type is correctly set' ); > > # offsets have the credit_id set to accountlines_id, and debit_id is undef > my $offset_1 = Koha::Account::Offsets->search({ credit_id => $line_1->id })->next; >diff --git a/t/db_dependent/Koha/Account/Lines.t b/t/db_dependent/Koha/Account/Lines.t >index 31ff05fd5e..dfd9dbb44c 100755 >--- a/t/db_dependent/Koha/Account/Lines.t >+++ b/t/db_dependent/Koha/Account/Lines.t >@@ -571,7 +571,7 @@ subtest "void() tests" => sub { > $line1->_result->discard_changes(); > $line2->_result->discard_changes(); > >- is( $account_payment->accounttype, 'Pay', 'Voided payment accounttype is still Pay' ); >+ is( $account_payment->credit_type_code, 'Pay', 'Voided payment credit_type_code is still Pay' ); > is( $account_payment->status, 'VOID', 'Voided payment status is VOID' ); > is( $account_payment->amount+0, 0, 'Voided payment amount is 0' ); > is( $account_payment->amountoutstanding+0, 0, 'Voided payment amount outstanding is 0' ); >-- >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 23805
:
94153
|
94154
|
94155
|
94156
|
94157
|
94158
|
94159
|
94160
|
94161
|
94162
|
94163
|
94164
|
94166
|
94167
|
94168
|
94169
|
94170
|
94171
|
94172
|
94173
|
94174
|
94175
|
94176
|
94177
|
94178
|
94801
|
94815
|
94832
|
94895