Lines 341-347
$prepared_letter = GetPreparedLetter((
Link Here
|
341 |
is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $yesterday_night }) . q|.|, 'dateonly test 3' ); |
341 |
is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $yesterday_night }) . q|.|, 'dateonly test 3' ); |
342 |
|
342 |
|
343 |
$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>');}); |
343 |
$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>');}); |
344 |
$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>');}); |
344 |
$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 %]');}); |
345 |
|
345 |
|
346 |
# Test that _parseletter doesn't modify its parameters bug 15429 |
346 |
# Test that _parseletter doesn't modify its parameters bug 15429 |
347 |
{ |
347 |
{ |
Lines 378-384
my $booksellerid = $bookseller->id;
Link Here
|
378 |
|
378 |
|
379 |
Koha::Acquisition::Bookseller::Contact->new( { name => 'John Smith', phone => '0123456x1', claimacquisition => 1, orderacquisition => 1, booksellerid => $booksellerid } )->store; |
379 |
Koha::Acquisition::Bookseller::Contact->new( { name => 'John Smith', phone => '0123456x1', claimacquisition => 1, orderacquisition => 1, booksellerid => $booksellerid } )->store; |
380 |
Koha::Acquisition::Bookseller::Contact->new( { name => 'Leo Tolstoy', phone => '0123456x2', claimissues => 1, booksellerid => $booksellerid } )->store; |
380 |
Koha::Acquisition::Bookseller::Contact->new( { name => 'Leo Tolstoy', phone => '0123456x2', claimissues => 1, booksellerid => $booksellerid } )->store; |
381 |
my $basketno = NewBasket($booksellerid, 1); |
381 |
my $basketno = NewBasket($booksellerid, 1, 'The basket name'); |
382 |
|
382 |
|
383 |
my $budgetid = C4::Budgets::AddBudget({ |
383 |
my $budgetid = C4::Budgets::AddBudget({ |
384 |
budget_code => "budget_code_test_letters", |
384 |
budget_code => "budget_code_test_letters", |
Lines 443-449
warning_like {
Link Here
|
443 |
"SendAlerts is using the mocked send_or_die routine (orderacquisition)"; |
443 |
"SendAlerts is using the mocked send_or_die routine (orderacquisition)"; |
444 |
is($err, 1, "Successfully sent order."); |
444 |
is($err, 1, "Successfully sent order."); |
445 |
is($email_object->email->header('To'), 'testemail@mydomain.com', "mailto correct in sent order"); |
445 |
is($email_object->email->header('To'), 'testemail@mydomain.com', "mailto correct in sent order"); |
446 |
is($email_object->email->body, 'my vendor|John Smith|Ordernumber ' . $ordernumber . ' (Silence in the library) (1 ordered)', 'Order notice text constructed successfully'); |
446 |
is($email_object->email->body, 'my vendor|John Smith|Ordernumber ' . $ordernumber . ' (Silence in the library) (1 ordered) Basket name: The basket name', 'Order notice text constructed successfully'); |
447 |
|
447 |
|
448 |
my $mocked_koha_email = Test::MockModule->new('Koha::Email'); |
448 |
my $mocked_koha_email = Test::MockModule->new('Koha::Email'); |
449 |
$mocked_koha_email->mock( 'send_or_die', sub { |
449 |
$mocked_koha_email->mock( 'send_or_die', sub { |
450 |
- |
|
|