6 use HTTP::Request::Common;
9 # Test cases for incoming utf8
12 package MyApp::Controller::Root;
13 $INC{'MyApp/Controller/Root.pm'} = __FILE__;
15 use base 'Catalyst::Controller';
17 sub heart :Path('♥') {
19 $c->response->body("This is the body");
24 $c->response->body("This is the body");
27 sub base :Chained('/') CaptureArgs(0) { }
28 sub link :Chained('base') PathPart('♥') Args(0) {
30 $c->response->body("This is the body");
36 Test::More::ok(MyApp->setup, 'setup app');
39 ok my $psgi = MyApp->psgi_app, 'build psgi app';
41 test_psgi $psgi, sub {
43 #my $res = $cb->(GET "/root/test");
44 #is $res->code, 200, 'OK';
45 #is $res->content, 'This is the body', 'correct body';
46 #is $res->content_length, 16, 'correct length';