X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FTest-WWW-Mechanize-Catalyst.git;a=blobdiff_plain;f=t%2Fmulti_content_type.t;h=521f46340555cfe8abfb7ce31a4e0599668ed10d;hp=71ac22880583a2c07167be5ee5571109fbadc34b;hb=97ae89ab316de422a55b3b3252ab4dbabfcdbdcd;hpb=affa35d5063fbeb1ca9ccc5bff2372b583c8575f diff --git a/t/multi_content_type.t b/t/multi_content_type.t index 71ac228..521f463 100644 --- a/t/multi_content_type.t +++ b/t/multi_content_type.t @@ -10,7 +10,7 @@ BEGIN { $ENV{CATALYST_SERVER} ||= "http://localhost:$PORT"; } -use Test::More tests => 6; +use Test::More tests => 8; use Test::Exception; BEGIN { @@ -36,19 +36,23 @@ my $skip = 0; TRY_CONNECT: { eval { $m->get('/') }; - if ($@ || $m->content =~ /Can't connect to localhost:$PORT/) { + if ($@ || $m->content =~ /Can't connect to \w+:$PORT/) { $skip = $@ || $m->content; } } SKIP: { - skip $skip, 5 if $skip; + skip $skip, 7 if $skip; lives_ok { $m->get_ok( '/', 'Get a multi Content-Type response' ) } 'Survive to a multi Content-Type sting'; is( $m->ct, 'text/html', 'Multi Content-Type Content-Type' ); $m->title_is( 'Root', 'Multi Content-Type title' ); $m->content_contains( "Hello, test \x{263A}!", 'Multi Content-Type body' ); + + # Test a redirect with a remote server now too. + $m->get_ok( '/hello' ); + is($m->uri, "$ENV{CATALYST_SERVER}/"); } END {