Update stash key from 'template_path' to 'template' to match mojo change
Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
This commit is contained in:
committed by
Ask Bjørn Hansen
parent
460b36497a
commit
165c3b39f2
@@ -52,7 +52,7 @@ sub _init {
|
||||
sub _render {
|
||||
my ($self, $renderer, $c, $output) = @_;
|
||||
|
||||
my $template_path = $c->stash->{template_path};
|
||||
my $template_path = $c->stash->{template};
|
||||
|
||||
unless (
|
||||
$self->tt->process(
|
||||
|
||||
@@ -17,13 +17,13 @@ my $mt = MojoX::Renderer::TT->build;
|
||||
my $output;
|
||||
my $rv;
|
||||
|
||||
$c->stash->{template_path} = 't/render/template.tt2';
|
||||
$c->stash->{template} = 't/render/template.tt2';
|
||||
|
||||
$rv = $mt->(undef, $c, \$output);
|
||||
is($rv, 1);
|
||||
is($output, "4\n");
|
||||
|
||||
$c->stash->{template_path} = 't/render/error.tt2';
|
||||
$c->stash->{template} = 't/render/error.tt2';
|
||||
$rv = $mt->(undef, $c, \$output);
|
||||
is($rv, 0);
|
||||
ok($output);
|
||||
|
||||
Reference in New Issue
Block a user