fix Test::More prereq for done_testing
[catagits/Catalyst-View-TT.git] / t / 07render.t
CommitLineData
1bc9fc55 1use strict;
2use warnings;
9d574573 3use Test::More tests => 7;
1bc9fc55 4
5use FindBin;
6use lib "$FindBin::Bin/lib";
7
8use_ok('Catalyst::Test', 'TestApp');
9
10my $response;
11ok(($response = request("/test_render?template=specified_template.tt&param=parameterized"))->is_success, 'request ok');
12is($response->content, "I should be a parameterized test in @{[TestApp->config->{name}]}", 'message ok');
13
14my $message = 'Dynamic message';
15
16ok(($response = request("/test_msg?msg=$message"))->is_success, 'request ok');
17is($response->content, "$message", 'message ok');
9d574573 18
19$response = request("/test_render?template=non_existant_template.tt");
20
21is (403, $response->code, 'request returned error');
22is($response->content, 'file error - non_existant_template.tt: not found', 'Error from non-existant-template');