Test uri_for with path = 0
[catagits/Catalyst-Runtime.git] / t / aggregate / catalyst_test_utf8.t
1 use strict;
2 use warnings;
3 use FindBin qw/$Bin/;
4 use lib "$Bin/../lib";
5
6 use Test::More;
7 # "binmode STDOUT, ':utf8'" is insufficient, see http://code.google.com/p/test-more/issues/detail?id=46#c1
8 binmode Test::More->builder->output, ":utf8";
9 binmode Test::More->builder->failure_output, ":utf8";
10
11 use Catalyst::Test 'TestAppEncoding';
12
13 plan skip_all => 'This test does not run live'
14     if $ENV{CATALYST_SERVER};
15
16 {   
17     # Test for https://rt.cpan.org/Ticket/Display.html?id=53678
18     # Catalyst::Test::get currently returns the raw octets, but it
19     # would be more useful if it decoded the content based on the
20     # Content-Type charset, as Test::WWW::Mechanize::Catalyst does
21     use utf8;
22     my $body = get('/utf8_non_ascii_content');
23     utf8::decode($body);
24     is $body, 'ʇsʎlɐʇɐɔ', 'Catalyst::Test::get returned content correctly UTF-8 encoded';
25 }
26
27 done_testing;