X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Futf_incoming.t;fp=t%2Futf_incoming.t;h=76eaa876a016e81e4ad7d319572ea2c580295502;hp=638cef5a1555ea2ab1830d0226494c86794e3187;hb=d200092825d92139d59f660eaa895790442cdf8b;hpb=d63cc9c82b21555490c13a14f6a586764b200bfa diff --git a/t/utf_incoming.t b/t/utf_incoming.t index 638cef5..76eaa87 100644 --- a/t/utf_incoming.t +++ b/t/utf_incoming.t @@ -3,6 +3,7 @@ use warnings; use strict; use Test::More; use HTTP::Request::Common; +use HTTP::Message::PSGI (); use Encode 2.21 'decode_utf8', 'encode_utf8'; use File::Spec; use JSON::MaybeXS; @@ -180,6 +181,12 @@ use JSON::MaybeXS; $c->response->write("

This is stream_write action ♥

"); } + sub from_external_psgi :Local { + my ($self, $c) = @_; + my $env = HTTP::Message::PSGI::req_to_psgi( HTTP::Request::Common::GET '/root/♥'); + $c->res->from_psgi_response( ref($c)->to_app->($env)); + } + package MyApp; use Catalyst; @@ -411,6 +418,14 @@ SKIP: { like decode_utf8($res->content), qr[

This is stream_write action ♥

code, 200, 'OK'; + is decode_utf8($res->content), '

This is path-heart action ♥

', 'correct body'; + is $res->content_length, 36, 'correct length'; + is $res->content_charset, 'UTF-8'; +} ## should we use binmode on filehandles to force the encoding...? ## Not sure what else to do with multipart here, if docs are enough...