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