View | Details | Raw Unified | Return to bug 28824
Collapse All | Expand All

(-)a/t/db_dependent/Letters.t (-4 / +3 lines)
Lines 324-330 $prepared_letter = GetPreparedLetter(( Link Here
324
is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $yesterday_night }) . q|.|, 'dateonly test 3' );
324
is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $yesterday_night }) . q|.|, 'dateonly test 3' );
325
325
326
$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>');});
326
$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>');});
327
$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>');});
327
$dbh->do(q{INSERT INTO letter (module, code, name, title, content) VALUES ('orderacquisition','TESTACQORDER','Acquisition Order','Order','<<aqbooksellers.name>>|<<aqcontacts.name>>|<<aqbasket.basketname>>|<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered)</order>');});
328
328
329
# Test that _parseletter doesn't modify its parameters bug 15429
329
# Test that _parseletter doesn't modify its parameters bug 15429
330
{
330
{
Lines 361-367 my $booksellerid = $bookseller->id; Link Here
361
361
362
Koha::Acquisition::Bookseller::Contact->new( { name => 'John Smith',  phone => '0123456x1', claimacquisition => 1, orderacquisition => 1, booksellerid => $booksellerid } )->store;
362
Koha::Acquisition::Bookseller::Contact->new( { name => 'John Smith',  phone => '0123456x1', claimacquisition => 1, orderacquisition => 1, booksellerid => $booksellerid } )->store;
363
Koha::Acquisition::Bookseller::Contact->new( { name => 'Leo Tolstoy', phone => '0123456x2', claimissues      => 1, booksellerid => $booksellerid } )->store;
363
Koha::Acquisition::Bookseller::Contact->new( { name => 'Leo Tolstoy', phone => '0123456x2', claimissues      => 1, booksellerid => $booksellerid } )->store;
364
my $basketno = NewBasket($booksellerid, 1);
364
my $basketno = NewBasket($booksellerid, 1, 'Named basket');
365
365
366
my $budgetid = C4::Budgets::AddBudget({
366
my $budgetid = C4::Budgets::AddBudget({
367
    budget_code => "budget_code_test_letters",
367
    budget_code => "budget_code_test_letters",
Lines 426-432 warning_like { Link Here
426
    "SendAlerts is using the mocked send_or_die routine (orderacquisition)";
426
    "SendAlerts is using the mocked send_or_die routine (orderacquisition)";
427
is($err, 1, "Successfully sent order.");
427
is($err, 1, "Successfully sent order.");
428
is($email_object->email->header('To'), 'testemail@mydomain.com', "mailto correct in sent order");
428
is($email_object->email->header('To'), 'testemail@mydomain.com', "mailto correct in sent order");
429
is($email_object->email->body, 'my vendor|John Smith|Ordernumber ' . $ordernumber . ' (Silence in the library) (1 ordered)', 'Order notice text constructed successfully');
429
is($email_object->email->body, 'my vendor|John Smith|Named basket|Ordernumber ' . $ordernumber . ' (Silence in the library) (1 ordered)', 'Order notice text constructed successfully');
430
430
431
my $mocked_koha_email = Test::MockModule->new('Koha::Email');
431
my $mocked_koha_email = Test::MockModule->new('Koha::Email');
432
$mocked_koha_email->mock( 'send_or_die', sub {
432
$mocked_koha_email->mock( 'send_or_die', sub {
433
- 

Return to bug 28824