make the httpexception filter more choosey
[catagits/Catalyst-Runtime.git] / t / utf_incoming.t
CommitLineData
9c86666a 1use utf8;
2use warnings;
3use strict;
4
5use Test::More;
6use HTTP::Request::Common;
7use Plack::Test;
8
9# Test cases for incoming utf8
10
11{
12 package MyApp::Controller::Root;
13 $INC{'MyApp/Controller/Root.pm'} = __FILE__;
14
15 use base 'Catalyst::Controller';
16
17 sub heart :Path('♥') {
18 my ($self, $c) = @_;
19 $c->response->body("This is the body");
20 }
21
22 sub hat :Path('^') {
23 my ($self, $c) = @_;
24 $c->response->body("This is the body");
25 }
26
27 sub base :Chained('/') CaptureArgs(0) { }
28 sub link :Chained('base') PathPart('♥') Args(0) {
29 my ($self, $c) = @_;
30 $c->response->body("This is the body");
31 }
32
33 package MyApp;
34 use Catalyst;
35
36 Test::More::ok(MyApp->setup, 'setup app');
37}
38
39ok my $psgi = MyApp->psgi_app, 'build psgi app';
40
41test_psgi $psgi, sub {
42 my $cb = shift;
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';
47};
48
49done_testing;