X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F14alt_content_type.t;h=01caea819415f9eb18ca0831580035b3f64d1563;hb=e0bcfc9869d6c49c33d43aced9165d1df2a434bb;hp=bed2f0fc81609187063f2b77604b657eed1c968f;hpb=556d7fe197591bb39b9c4ac4c113f0d83a6ed85e;p=catagits%2FCatalyst-View-TT.git diff --git a/t/14alt_content_type.t b/t/14alt_content_type.t index bed2f0f..01caea8 100644 --- a/t/14alt_content_type.t +++ b/t/14alt_content_type.t @@ -6,6 +6,11 @@ use FindBin; use lib "$FindBin::Bin/lib"; use_ok('Catalyst::Test', 'TestApp'); -is(request("/test_alt_content_type")->header('Content-Type'), 'text/plain'); +# Hack to support Catalyst v5.90080+ (JNAP) +if(TestApp->can('encoding') and (my $enc = TestApp->encoding) and TestApp->can('clear_encoding')) { + is(request("/test_alt_content_type")->header('Content-Type'), "text/plain; charset=${\$enc->mime_name}", "Plain text with ${\$enc->mime_name}"); +} else { + is(request("/test_alt_content_type")->header('Content-Type'), 'text/plain', 'Plain Text'); +} done_testing;