|
Lines 19-25
Link Here
|
| 19 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
19 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 20 |
|
20 |
|
| 21 |
use Modern::Perl; |
21 |
use Modern::Perl; |
| 22 |
use Test::More tests => 27; |
22 |
use Test::More tests => 28; |
| 23 |
use Test::MockModule; |
23 |
use Test::MockModule; |
| 24 |
use Test::Warn; |
24 |
use Test::Warn; |
| 25 |
|
25 |
|
|
Lines 1082-1087
subtest 'add_tt_filters' => sub {
Link Here
|
| 1082 |
is( $letter->{content}, $expected_letter, "Pre-processing should call TT plugin to remove punctuation if table is biblio or biblioitems"); |
1082 |
is( $letter->{content}, $expected_letter, "Pre-processing should call TT plugin to remove punctuation if table is biblio or biblioitems"); |
| 1083 |
}; |
1083 |
}; |
| 1084 |
|
1084 |
|
|
|
1085 |
subtest 'Handle includes' => sub { |
| 1086 |
plan tests => 1; |
| 1087 |
my $cgi = CGI->new(); |
| 1088 |
my $code = 'TEST_INCLUDE'; |
| 1089 |
my $account = |
| 1090 |
$builder->build_object( { class => 'Koha::Account::Lines', value => { credit_type_code => 'PAYMENT', status => 'CANCELLED' } } ); |
| 1091 |
my $template = <<EOF; |
| 1092 |
[%- USE Price -%] |
| 1093 |
[%- PROCESS 'accounts.inc' -%] |
| 1094 |
[%- PROCESS account_type_description account=credit -%] |
| 1095 |
EOF |
| 1096 |
reset_template({ template => $template, code => $code, module => 'test' }); |
| 1097 |
my $letter = GetPreparedLetter( |
| 1098 |
module => 'test', |
| 1099 |
letter_code => $code, |
| 1100 |
tables => { |
| 1101 |
credits => $account->accountlines_id |
| 1102 |
} |
| 1103 |
); |
| 1104 |
is($letter->{content},' <span>Payment<span> (Cancelled)</span> </span>', "Include used in notice"); |
| 1105 |
}; |
| 1106 |
|
| 1085 |
subtest 'Dates formatting' => sub { |
1107 |
subtest 'Dates formatting' => sub { |
| 1086 |
plan tests => 1; |
1108 |
plan tests => 1; |
| 1087 |
my $code = 'TEST_DATE'; |
1109 |
my $code = 'TEST_DATE'; |
| 1088 |
- |
|
|