uri_for fixup (with thanks to phaylon)
[catagits/Catalyst-Runtime.git] / t / live_component_controller_action_chained.t
index a92f32c..0ed19c7 100644 (file)
@@ -10,7 +10,7 @@ our $iters;
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; }
 
-use Test::More tests => 101*$iters;
+use Test::More tests => 103*$iters;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -691,6 +691,19 @@ sub run_tests {
     }
 
     #
+    #   Tests that an uri_for to a chained root index action
+    #   returns the right value.
+    #
+    {
+        ok( my $response = request(
+            'http://localhost/action/chained/to_root' ),
+            'uri_for with chained root action as arg' );
+        is( $response->content,
+            'URI:http://localhost/',
+            'Correct URI generated' );
+    }
+
+    #
     #   Test interception of recursive chains. This test was added because at
     #   one point during the :Chained development, Catalyst used to hang on
     #   recursive chains.