Bug 38872: Add a test
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
747a60f33a
commit
7fdf2983a9
|
|
@ -198,7 +198,7 @@ EXPECTED
|
|||
};
|
||||
|
||||
subtest 'Use uri filter if needed' => sub {
|
||||
plan tests => 4;
|
||||
plan tests => 5;
|
||||
my $input = <<INPUT;
|
||||
<a href="tel:[% patron.phone %]">[% patron.phone %]</a>
|
||||
<a href="mailto:[% patron.emailpro %]" title="[% patron.emailpro %]">[% patron.emailpro %]</a>
|
||||
|
|
@ -248,6 +248,23 @@ INPUT
|
|||
],
|
||||
);
|
||||
|
||||
$input = <<INPUT;
|
||||
<a href="[% good_filter | uri %]">[% var | html %]</a><a href="[% wrong_filter | html %]">[% var | html %]</a>
|
||||
INPUT
|
||||
@missing_filters = t::lib::QA::TemplateFilters::missing_filters($input);
|
||||
is_deeply(
|
||||
\@missing_filters,
|
||||
[
|
||||
{
|
||||
error => "wrong_html_filter",
|
||||
line =>
|
||||
'<a href="[% good_filter | uri %]">[% var | html %]</a><a href="[% wrong_filter | html %]">[% var | html %]</a>',
|
||||
line_number => 1
|
||||
}
|
||||
|
||||
],
|
||||
);
|
||||
|
||||
$input = <<INPUT;
|
||||
<a href="[% good_raw_filter | \$raw %]">[% var | html %]</a>
|
||||
INPUT
|
||||
|
|
|
|||
Loading…
Reference in New Issue