Bugzilla – Attachment 146906 Details for
Bug 31858
TT syntax for ACQORDER notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31858: unit tests
Bug-31858-unit-tests.patch (text/plain), 2.98 KB, created by
Kyle M Hall (khall)
on 2023-02-17 18:55:38 UTC
(
hide
)
Description:
Bug 31858: unit tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-02-17 18:55:38 UTC
Size:
2.98 KB
patch
obsolete
>From 2ae2df5547c92d9e9416f0ed143dd36b82278472 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Wed, 19 Oct 2022 14:36:18 +0000 >Subject: [PATCH] Bug 31858: unit tests > >Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/Letters.t | 53 +++++++++++++++++++++++++++++++++++++++- > 1 file changed, 52 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 814d5e60e9..9251c149e3 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -18,7 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 85; >+use Test::More tests => 86; > use Test::MockModule; > use Test::Warn; > use Test::Exception; >@@ -343,6 +343,57 @@ is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $ye > $dbh->do(q{INSERT INTO letter (module, code, name, title, content) VALUES ('claimacquisition','TESTACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>|<<aqcontacts.name>>|<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered)</order>');}); > $dbh->do(q{INSERT INTO letter (module, code, name, title, content) VALUES ('orderacquisition','TESTACQORDER','Acquisition Order','Order','<<aqbooksellers.name>>|<<aqcontacts.name>>|<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered)</order> Basket name: [% basket.basketname %]');}); > >+my $testacqorder2_content = <<EOF; >+[%- USE Price -%] >+[% bookseller.name %] >+[% FOREACH order IN orders %] >+Ordernumber [% order.ordernumber %] [% order.quantity %] [% order.listprice | \$Price %] >+[% END %] >+EOF >+ >+$dbh->do("INSERT INTO letter (module, code, name, title, content) VALUES ('orderacquisition','TESTACQORDER2','Acquisition Order','Order','$testacqorder2_content');"); >+ >+my $popito = $builder->build({ >+ source => 'Aqbookseller', >+ value => { name => 'Popito' } >+}); >+ >+my $order_1 = $builder->build({ >+ source => 'Aqorder', >+ value => { >+ quantity => 2, >+ listprice => '12.00' >+ } >+}); >+ >+my $order_2 = $builder->build({ >+ source => 'Aqorder', >+ value => { >+ quantity => 1, >+ listprice => '23.50' >+ } >+}); >+ >+$prepared_letter = GetPreparedLetter(( >+ module => 'orderacquisition', >+ branchcode => '', >+ letter_code => 'TESTACQORDER2', >+ tables => { 'aqbooksellers' => $popito->{id} }, >+ loops => { >+ aqorders => [ $order_1->{ordernumber}, $order_2->{ordernumber} ] >+ } >+)); >+ >+my $testacqorder2_expected = qq|Popito >+ >+Ordernumber | . $order_1->{ordernumber} . qq| 2 12.00 >+ >+Ordernumber | . $order_2->{ordernumber} . qq| 1 23.50 >+ >+|; >+ >+is($prepared_letter->{content}, $testacqorder2_expected); >+ > # Test that _parseletter doesn't modify its parameters bug 15429 > { > my $values = { dateexpiry => '2015-12-13', }; >-- >2.30.2
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 31858
:
142160
|
142161
|
142162
|
142163
|
145246
|
146904
|
146905
| 146906