X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Futf_incoming.t;h=ff61a6bfedae526f8c6f22114170c3e0f4f095c7;hb=26abb70733120828ebd6026e3ce8907385a53608;hp=6342025b8f4795fe0fe5cf43a33e41a16eef3e76;hpb=6cf77e11ef210219fbbe19df5f5b7cd7c84f501c;p=catagits%2FCatalyst-Runtime.git diff --git a/t/utf_incoming.t b/t/utf_incoming.t index 6342025..ff61a6b 100644 --- a/t/utf_incoming.t +++ b/t/utf_incoming.t @@ -111,6 +111,14 @@ use Scalar::Util (); $c->response->body($contents); } + sub write_then_body :Local { + my ($self, $c) = @_; + + $c->res->content_type('text/html'); + $c->res->write("

This is early_write action ♥

"); + $c->res->body("

This is body_write action ♥

"); + } + sub file_upload :POST Consumes(Multipart) Local { my ($self, $c) = @_; Test::More::is $c->req->body_parameters->{'♥'}, '♥♥'; @@ -365,6 +373,14 @@ use Catalyst::Test 'MyApp'; } { + my $res = request "/root/write_then_body"; + + is $res->code, 200, 'OK'; + is decode_utf8($res->content), "

This is early_write action ♥

This is body_write action ♥

"; + is $res->content_charset, 'UTF-8'; +} + +{ ok my $path = File::Spec->catfile('t', 'utf8.txt'); ok my $req = POST '/root/file_upload', Content_Type => 'form-data',