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 471-476
Thank you for visiting [% branch.branchname %].
Link Here
|
471 |
is( $second_checkin_tt_letter->content, $second_checkin_letter->content, ); |
471 |
is( $second_checkin_tt_letter->content, $second_checkin_letter->content, ); |
472 |
|
472 |
|
473 |
}; |
473 |
}; |
|
|
474 |
|
475 |
subtest 'DUEDGST|count' => sub { |
476 |
plan tests => 1; |
477 |
|
478 |
my $code = 'DUEDGST'; |
479 |
|
480 |
my $dbh = C4::Context->dbh; |
481 |
# Enable notification for DUEDGST - Things are hardcoded here but should work with default data |
482 |
$dbh->do(q|INSERT INTO borrower_message_preferences( borrowernumber, message_attribute_id ) VALUES ( ?, ? )|, undef, $patron->{borrowernumber}, 1 ); |
483 |
my $borrower_message_preference_id = $dbh->last_insert_id(undef, undef, "borrower_message_preferences", undef); |
484 |
$dbh->do(q|INSERT INTO borrower_message_transport_preferences( borrower_message_preference_id, message_transport_type) VALUES ( ?, ? )|, undef, $borrower_message_preference_id, 'email' ); |
485 |
|
486 |
my $params = { |
487 |
code => $code, |
488 |
substitute => { count => 42 }, |
489 |
}; |
490 |
|
491 |
my $template = q| |
492 |
You have <<count>> items due |
493 |
|; |
494 |
my $letter = process_letter( { template => $template, %$params }); |
495 |
|
496 |
my $tt_template = q| |
497 |
You have [% count %] items due |
498 |
|; |
499 |
my $tt_letter = process_letter( { template => $tt_template, %$params }); |
500 |
is( $tt_letter->{content}, $letter->{content}, ); |
501 |
}; |
502 |
|
474 |
}; |
503 |
}; |
475 |
|
504 |
|
476 |
sub reset_template { |
505 |
sub reset_template { |
477 |
- |
|
|