Bugzilla – Attachment 56550 Details for
Bug 5260
Add option to send an order by e-mail to the acquisition module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5260: Unit tests for new functionality in SendAlert
Bug-5260-Unit-tests-for-new-functionality-in-SendA.patch (text/plain), 2.62 KB, created by
Katrin Fischer
on 2016-10-14 14:29:06 UTC
(
hide
)
Description:
Bug 5260: Unit tests for new functionality in SendAlert
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-10-14 14:29:06 UTC
Size:
2.62 KB
patch
obsolete
>From 15097b16c6bb7b30bf19fff95fba16eaa3b548d9 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Fri, 14 Oct 2016 12:02:33 +0200 >Subject: [PATCH] Bug 5260: Unit tests for new functionality in SendAlert > >--- > t/db_dependent/Letters.t | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 0b7d125..d283c01 100644 >--- 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 => 74; >+use Test::More tests => 78; > use Test::MockModule; > use Test::Warn; > >@@ -356,6 +356,7 @@ $prepared_letter = GetPreparedLetter(( > is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $yesterday_night }) . q|.|, 'dateonly test 3' ); > > $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>');}); > > # Test that _parseletter doesn't modify its parameters bug 15429 > { >@@ -373,7 +374,7 @@ my $booksellerid = C4::Bookseller::AddBookseller( > deliverytime => 5, > }, > [ >- { name => 'John Smith', phone => '0123456x1', claimacquisition => 1 }, >+ { name => 'John Smith', acqprimary => 1, phone => '0123456x1', claimacquisition => 1, orderacquisition => 1 }, > { name => 'Leo Tolstoy', phone => '0123456x2', claimissues => 1 }, > ] > ); >@@ -424,6 +425,17 @@ t::lib::Mocks::mock_preference( 'LetterLog', 'on' ); > > { > warning_is { >+ $err = SendAlerts( 'orderacquisition', $basketno , 'TESTACQORDER' ) } >+ "Fake sendmail", >+ "SendAlerts is using the mocked sendmail routine (orderacquisition)"; >+is($err, 1, "Successfully sent order."); >+is($mail{'To'}, 'testemail@mydomain.com', "mailto correct in sent order"); >+is($mail{'Message'}, 'my vendor|John Smith|Ordernumber ' . $ordernumber . ' (Silence in the library) (1 ordered)', 'Order notice text constructed successfully'); >+} >+ >+ >+{ >+warning_is { > $err = SendAlerts( 'claimacquisition', [ $ordernumber ], 'TESTACQCLAIM' ) } > "Fake sendmail", > "SendAlerts is using the mocked sendmail routine"; >-- >2.7.4
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 5260
:
2653
|
4067
|
4068
|
4781
|
22171
|
56449
|
56450
|
56483
|
56484
|
56549
|
56550
|
56551
|
56560
|
56561
|
56562
|
56568
|
56679
|
56680
|
56686
|
56687
|
56688
|
56689
|
56705
|
56706
|
56707
|
56708
|
56709
|
56786
|
56787
|
56788
|
56789
|
56790
|
56791
|
56792
|
56793
|
56794
|
56795