X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_component_controller_action_chained.t;h=88782d60dc7d96ebbce92b46e93512b6cb63058b;hb=2989c763b19546aad894be3d37d8454ed9e8c737;hp=da3b98b31880ed96359e10c8cb3c1318d9909cc5;hpb=93ba5ed5af52e17d9b5a70e582c0ebd39a7f7de4;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_component_controller_action_chained.t b/t/live_component_controller_action_chained.t index da3b98b..88782d6 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} || 1; } -use Test::More tests => 138*$iters; +use Test::More tests => 141*$iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -531,7 +531,6 @@ sub run_tests { # Test if :Chained('../act') is working # { - local $TODO = "To Be Coded"; my @expected = qw[ TestApp::Controller::Action::Chained->begin TestApp::Controller::Action::Chained->one @@ -549,10 +548,30 @@ sub run_tests { } # + # Test if ../ works to go up more than one level + # + { + local $TODO = 'to be coded'; + my @expected = qw[ + TestApp::Controller::Action::Chained->begin + TestApp::Controller::Action::Chained->one + TestApp::Controller::Action::Chained::ParentChain::Relative->chained_rel_two + TestApp::Controller::Action::Chained->end + ]; + + my $expected = join( ", ", @expected ); + + ok( my $response = request('http://localhost/chained/one/1/chained_rel_two/42/23'), + "../ works to go up more than one level" ); + is( $response->header('X-Catalyst-Executed'), + $expected, 'Executed actions' ); + is( $response->content, '1; 42, 23', 'Content OK' ); + } + + # # Test if :ChainedParent is working # { - local $TODO = "To Be Coded"; my @expected = qw[ TestApp::Controller::Action::Chained->begin TestApp::Controller::Action::Chained->loose @@ -573,7 +592,6 @@ sub run_tests { # Test if :Chained('../name/act') is working # { - local $TODO = "To Be Coded"; my @expected = qw[ TestApp::Controller::Action::Chained->begin TestApp::Controller::Action::Chained::Bar->cross1