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

(-)a/t/template_filters.t (-2 / +18 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use Test::More tests => 6;
19
use Test::More tests => 7;
20
use t::lib::QA::TemplateFilters;
20
use t::lib::QA::TemplateFilters;
21
21
22
subtest 'Asset must use raw' => sub {
22
subtest 'Asset must use raw' => sub {
Lines 301-305 EXPECTED Link Here
301
            }
301
            }
302
        ]
302
        ]
303
    );
303
    );
304
};
304
305
306
subtest 'Do not escape TT methods' => sub {
307
    plan tests => 2;
308
    my $input = <<INPUT;
309
[% my_array.push(a_var) %]
310
INPUT
311
312
    my $expected = <<EXPECTED;
313
[% my_array.push(a_var) %]
314
EXPECTED
315
316
    my $new_content = t::lib::QA::TemplateFilters::fix_filters($input);
317
    is( $new_content . "\n", $expected, );
318
319
320
    my @missing_filters = t::lib::QA::TemplateFilters::missing_filters($input);
321
    is_deeply(\@missing_filters, []);
305
};
322
};
306
- 

Return to bug 22466