totally forgot to check if captureargs are decoded, and they already are
Rafael Kitover [Tue, 26 May 2009 20:44:10 +0000 (20:44 +0000)]
t/aggregate/live_component_controller_action_chained.t
t/lib/TestApp/Controller/Action/Chained.pm

index 9d83176..615289c 100644 (file)
@@ -10,7 +10,7 @@ our $iters;
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 147*$iters;
+use Test::More tests => 148*$iters;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -1007,9 +1007,10 @@ sub run_tests {
 
     {
         ok( my $content =
-            get('http://localhost/chained/return_arg/foo%2Fbar%3B'),
+            get('http://localhost/chained/capture%2Farg%3B/return_arg/foo%2Fbar%3B'),
             'request with URI-encoded arg' );
         like( $content, qr{foo/bar;\z}, 'args decoded' );
+        like( $content, qr{capture/arg;}, 'captureargs decoded' );
     }
     {
         ok( my $content =
index 051961c..64de556 100644 (file)
@@ -197,7 +197,8 @@ sub view : Chained('/') PathPart('chained') CaptureArgs(1) {}
 sub star_search : Chained('view') PathPart('search') Args(0) { }
 sub doc_star : Chained('/') PathPart('chained/doc') Args(1) {}
 
-sub return_arg : Chained('/') PathPart('chained/return_arg') Args(1) {}
+sub return_arg : Chained('view') PathPart('return_arg') Args(1) {}
+
 sub return_arg_decoded : Chained('/') PathPart('chained/return_arg_decoded') Args(1) {
     my ($self, $c) = @_;
     $c->req->args([ map { decode_entities($_) } @{ $c->req->args }]);