Bugzilla – Attachment 95944 Details for
Bug 23181
Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23181: [18.11] Extend unit tests
Bug-23181-1811-Extend-unit-tests.patch (text/plain), 3.06 KB, created by
Katrin Fischer
on 2019-12-03 12:55:23 UTC
(
hide
)
Description:
Bug 23181: [18.11] Extend unit tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-12-03 12:55:23 UTC
Size:
3.06 KB
patch
obsolete
>From 9282de9c744e1a4ab2104c75ba1afb3a6e4195e4 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Sat, 2 Nov 2019 01:05:06 +0000 >Subject: [PATCH] Bug 23181: [18.11] Extend unit tests > >Run t/db_dependent/Accounts.t > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Accounts.t | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t >index f76f85c6f0..83343ec8d5 100644 >--- a/t/db_dependent/Accounts.t >+++ b/t/db_dependent/Accounts.t >@@ -1002,7 +1002,7 @@ subtest "Payment notice tests" => sub { > my $line = Koha::Account::Line->new({ borrowernumber => $borrower->borrowernumber, amountoutstanding => 27 })->store(); > > my $letter = Koha::Notice::Templates->find( { code => 'ACCOUNT_PAYMENT' } ); >- $letter->content('[%- USE Price -%]A payment of [% credit.amount * -1 | $Price %] has been applied to your account.'); >+ $letter->content('[%- USE Price -%]A payment of [% credit.amount * -1 | $Price %] has been applied to your account. Your [% branch.branchcode %]'); > $letter->store(); > > t::lib::Mocks::mock_preference('UseEmailReceipts', '0'); >@@ -1015,22 +1015,22 @@ subtest "Payment notice tests" => sub { > > t::lib::Mocks::mock_preference('UseEmailReceipts', '1'); > >- $id = $account->pay( { amount => 12 } ); >+ $id = $account->pay( { amount => 12, library_id => $branchcode } ); > my $notice = Koha::Notice::Messages->search()->next(); > is( $notice->subject, 'Account payment', 'Notice subject is correct for payment' ); > is( $notice->letter_code, 'ACCOUNT_PAYMENT', 'Notice letter code is correct for payment' ); >- is( $notice->content, 'A payment of 12.00 has been applied to your account.', 'Notice content is correct for payment' ); >+ is( $notice->content, "A payment of 12.00 has been applied to your account. Your $branchcode", 'Notice content is correct for payment' ); > $notice->delete(); > > $letter = Koha::Notice::Templates->find( { code => 'ACCOUNT_WRITEOFF' } ); >- $letter->content('[%- USE Price -%]A writeoff of [% credit.amount * -1 | $Price %] has been applied to your account.'); >+ $letter->content('[%- USE Price -%]A writeoff of [% credit.amount * -1 | $Price %] has been applied to your account. Your [% branch.branchcode %]'); > $letter->store(); > >- $id = $account->pay( { amount => 13, type => 'writeoff' } ); >+ $id = $account->pay( { amount => 13, type => 'writeoff', library_id => $branchcode } ); > $notice = Koha::Notice::Messages->search()->next(); > is( $notice->subject, 'Account writeoff', 'Notice subject is correct for payment' ); > is( $notice->letter_code, 'ACCOUNT_WRITEOFF', 'Notice letter code is correct for writeoff' ); >- is( $notice->content, 'A writeoff of 13.00 has been applied to your account.', 'Notice content is correct for writeoff' ); >+ is( $notice->content, "A writeoff of 13.00 has been applied to your account. Your $branchcode", 'Notice content is correct for writeoff' ); > }; > > 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 23181
:
90908
|
91520
|
94967
|
94980
|
94981
| 95944