diff options
Diffstat (limited to 't/003-safestring.t')
-rw-r--r-- | t/003-safestring.t | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/t/003-safestring.t b/t/003-safestring.t index 77aa7de..8e095ea 100644 --- a/t/003-safestring.t +++ b/t/003-safestring.t @@ -1,7 +1,7 @@ use strict; use warnings; use Test::More; -use Text::Xslate; +use Text::Xslate 'mark_raw'; my $tx = Text::Xslate->new(syntax => 'Handlebars'); @@ -16,18 +16,15 @@ is( is( $tx->render_string( '<h1>{{title}}</h1><p>{{{body}}}</p>', - { title => 'All about <p> Tags', body => '<i>This is a post about <p> tags</i>' }, + { title => 'All About <p> Tags', body => '<i>This is a post about <p> tags</i>' }, ), '<h1>All About <p> Tags</h1><p><i>This is a post about <p> tags</i></p>', ); -# XXX I'm not sure what the safestring constructor should be called -# it's effectively Handlebars::SafeString->new($str) in JS -# maybe we can just use Text::Xslate's mark_raw directly is( $tx->render_string( '<h1>{{title}}</h1><p>{{{body}}}</p>', - { title => Handlebars::SafeString->new('All about <p> Tags'), body => '<i>This is a post about <p> tags</i>' }, + { title => mark_raw('All About <p> Tags'), body => '<i>This is a post about <p> tags</i>' }, ), '<h1>All About <p> Tags</h1><p><i>This is a post about <p> tags</i></p>', ); |