4 use Test::More qw/no_plan/;
8 use parent qw/Catalyst/;
9 use parent qw/Catalyst::Controller/;
13 my ($self, $c, @path) = @_;
14 $c->res->body(join "/", @path);
16 sub another :Path('something') {
20 sub thing_uri :Path('thing_uri') {
21 my ($self, $c, @path) = @_;
22 $c->res->body($c->uri_for(@path));
26 use_ok "Catalyst::Test", "TestApp";
27 my $req_path = 'foo/bar/baz quoxx{fnord}';
28 my $req = request("/$req_path");
29 ok($req->is_success, 'request succeeds');
30 is($req->content, $req_path, "returned path is identical to received path");
31 $req = request("/something/$req_path");
32 ok($req->is_success, 'request succeeds');
33 is($req->content, $req_path, "returned path is identical to received path 2");
34 $req = request("/thing_uri/$req_path");
35 ok($req->is_success, 'request succeeds');
36 is($req->content, "http://localhost/$req_path", "returned path is identical to received path 2");