Lines 286-292
$prepared_letter = GetPreparedLetter(
Link Here
|
286 |
is( $prepared_letter->{content}, $modification->id(), 'Patron modification object used correctly' ); |
286 |
is( $prepared_letter->{content}, $modification->id(), 'Patron modification object used correctly' ); |
287 |
|
287 |
|
288 |
subtest 'regression tests' => sub { |
288 |
subtest 'regression tests' => sub { |
289 |
plan tests => 3; |
289 |
plan tests => 4; |
290 |
|
290 |
|
291 |
my $library = $builder->build( { source => 'Branch' } ); |
291 |
my $library = $builder->build( { source => 'Branch' } ); |
292 |
my $patron = $builder->build( { source => 'Borrower' } ); |
292 |
my $patron = $builder->build( { source => 'Borrower' } ); |
Lines 472-477
Thank you for visiting [% branch.branchname %].
Link Here
|
472 |
is( $second_checkin_tt_letter->content, $second_checkin_letter->content, 'Verify second checkin letter' ); |
472 |
is( $second_checkin_tt_letter->content, $second_checkin_letter->content, 'Verify second checkin letter' ); |
473 |
|
473 |
|
474 |
}; |
474 |
}; |
|
|
475 |
|
476 |
subtest 'DUEDGST|count' => sub { |
477 |
plan tests => 1; |
478 |
|
479 |
my $code = 'DUEDGST'; |
480 |
|
481 |
my $dbh = C4::Context->dbh; |
482 |
# Enable notification for DUEDGST - Things are hardcoded here but should work with default data |
483 |
$dbh->do(q|INSERT INTO borrower_message_preferences( borrowernumber, message_attribute_id ) VALUES ( ?, ? )|, undef, $patron->{borrowernumber}, 1 ); |
484 |
my $borrower_message_preference_id = $dbh->last_insert_id(undef, undef, "borrower_message_preferences", undef); |
485 |
$dbh->do(q|INSERT INTO borrower_message_transport_preferences( borrower_message_preference_id, message_transport_type) VALUES ( ?, ? )|, undef, $borrower_message_preference_id, 'email' ); |
486 |
|
487 |
my $params = { |
488 |
code => $code, |
489 |
substitute => { count => 42 }, |
490 |
}; |
491 |
|
492 |
my $template = q| |
493 |
You have <<count>> items due |
494 |
|; |
495 |
my $letter = process_letter( { template => $template, %$params }); |
496 |
|
497 |
my $tt_template = q| |
498 |
You have [% count %] items due |
499 |
|; |
500 |
my $tt_letter = process_letter( { template => $tt_template, %$params }); |
501 |
is( $tt_letter->{content}, $letter->{content}, ); |
502 |
}; |
475 |
}; |
503 |
}; |
476 |
|
504 |
|
477 |
subtest 'loops' => sub { |
505 |
subtest 'loops' => sub { |
478 |
- |
|
|