Fix ->finalize_headers getting called twice. RT#78090
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_action_chained.t
index 20349df..6f01812 100644 (file)
@@ -865,12 +865,9 @@ sub run_tests {
 
         ok( my $response = request('http://localhost/chained/mult_nopp2/action'),
             "Complex path with multiple non-capturing pathparts" );
-        TODO: {
-        local $TODO = 'Known bug';
         is( $response->header('X-Catalyst-Executed'),
             $expected, 'Executed actions' );
         is( $response->content, '; ', 'Content OK' );
-        }
     }
 
     #
@@ -1116,6 +1113,19 @@ sub run_tests {
         ok( index($content, $path) > 1, 'uri can round trip through uri_for' )
             or diag("Expected $path, got $content");
     }
+
+    #
+    #   match_captures
+    #
+    {
+
+        ok( my $response = request('http://localhost/chained/match_captures/foo/bar'), 'match_captures: falling through' );
+        is($response->header('X-TestAppActionTestMatchCaptures'), 'fallthrough', 'match_captures: fell through');
+
+        ok($response = request('http://localhost/chained/match_captures/force/bar'), 'match_captures: *not* falling through' );
+        is($response->header('X-TestAppActionTestMatchCaptures'), 'forcing', 'match_captures: forced');
+        is($response->header('X-TestAppActionTestMatchCapturesHasRan'), 'yes', 'match_captures: actually ran');
+    }
 }
 
 done_testing;