X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flive_component_controller_action_chained.t;h=ee502146cd32ed4cbc4edcc65b42c7f0daec269e;hp=b9367a21e8c8469b1d68762455c300d78b6d21fd;hb=8a6a6581d48a3c1c4d5f631cdb7cbda336c0e5e2;hpb=1b04b972e18d9681ab30d07a267bb2896ea9f7d2 diff --git a/t/live_component_controller_action_chained.t b/t/live_component_controller_action_chained.t index b9367a2..ee50214 100644 --- a/t/live_component_controller_action_chained.t +++ b/t/live_component_controller_action_chained.t @@ -10,7 +10,7 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } -use Test::More tests => 99*$iters; +use Test::More tests => 101*$iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -19,11 +19,12 @@ if ( $ENV{CAT_BENCHMARK} ) { } else { for ( 1 .. $iters ) { - run_tests(); + run_tests($_); } } sub run_tests { + my ($run_number) = @_; # # This is a simple test where the parent and child actions are @@ -688,4 +689,26 @@ sub run_tests { $expected, 'Executed actions' ); is( $response->content, '1; 2', 'Content OK' ); } + + # + # Test interception of recursive chains. This test was added because at + # one point during the :Chained development, Catalyst used to hang on + # recursive chains. + # + { + eval { require 'TestAppChainedRecursive.pm' }; + pass( "Interception of recursive chains" ); + } + + # + # Test failure of absolute path part arguments. + # + { + eval { require 'TestAppChainedAbsolutePathPart.pm' }; + if ($run_number == 1) { + like( $@, qr(foo/foo), + "Usage of absolute path part argument emits error" ); + } + else { pass( "Error on absolute path part arguments already tested" ) } + } }