failing test for not returning not found correctly

This commit is contained in:
Rafael Kitover
2013-01-09 13:13:53 -05:00
parent f3e65cedce
commit d45efa5405
+36
View File
@@ -0,0 +1,36 @@
use strict;
use warnings;
use Test::More tests => 3;
use Test::Mojo;
use File::Temp qw( tempdir );
use FindBin '$Bin';
use Mojolicious::Lite;
use Mojolicious::Plugin::TtRenderer::Engine ();
my $tt = Mojolicious::Plugin::TtRenderer::Engine->build(
mojo => app,
template_options => {
UNICODE => 1,
ENCODING => 'UTF-8',
INCLUDE_PATH => "$Bin/templates",
}
);
app->renderer->add_handler(tt => $tt);
app->renderer->default_handler('tt');
get '/' => sub {
die 'foo';
};
my $t = Test::Mojo->new;
$t->get_ok('/')
->status_is(500)
->content_like(qr{foo});
__DATA__
@@ index.html.tt
anything