X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F14alt_content_type.t;h=b2cc8c431ee08d7a59d73fec91849fe5e38fbe4f;hb=8b7d5e5b2ba08d5301b186b9cb42e7fff3d3d6b8;hp=bed2f0fc81609187063f2b77604b657eed1c968f;hpb=59a2e92ae5c162501fca685ee55406b0ed5fe4a2;p=catagits%2FCatalyst-View-TT.git diff --git a/t/14alt_content_type.t b/t/14alt_content_type.t index bed2f0f..b2cc8c4 100644 --- a/t/14alt_content_type.t +++ b/t/14alt_content_type.t @@ -1,11 +1,16 @@ use strict; use warnings; -use Test::More; +use Test::More 0.88; 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;