Catalyst-View-Template
view release on metacpan or search on metacpan
is $response->content, 'No argument from me', '... with the expected content';
my $have_encoding = MyApp->can('encoding') && MyApp->can('clear_encoding');
BEGIN { $num_tests += 4 }
SKIP: {
skip 'No UTF-8 tests on older Catalyst', 4 unless $have_encoding;
ok $response = request( '/â¥' ), 'Unicode path request';
is $response->code, 200, '... succeeds';
is $response->content_charset, 'UTF-8', '... with the expected response charset';
is $response->decoded_content, "<p>Heart literal â¥</p><p>Heart variable â¥â¥â¥</p>\n", '... and the expected body';
}
my @view;
BEGIN { $num_tests += 6 * ( @view = qw( PkgConfig AppConfig TemplateClass ) ) }
for my $view ( @view ) {
ok $response = request( "/test?view=$view" ), "$view request";
ok $response->is_success, '... succeeds';
is $response->content, MyApp->config->{'default_message'}, '... with the expected content';
my $message = scalar localtime;
( run in 0.326 second using v1.01-cache-2.11-cpan-26ccb49234f )