From: Florian Ragwitz Date: Sun, 24 Aug 2008 19:31:53 +0000 (+0000) Subject: Fix tests for ../action chaining. X-Git-Tag: 5.7099_04~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=93ba5ed5af52e17d9b5a70e582c0ebd39a7f7de4 Fix tests for ../action chaining. rootdef is an endaction; the tests expect two args for chained_rel. --- diff --git a/t/lib/TestApp/Controller/Action/Chained/ParentChain.pm b/t/lib/TestApp/Controller/Action/Chained/ParentChain.pm index fd9d9e7..69614d5 100644 --- a/t/lib/TestApp/Controller/Action/Chained/ParentChain.pm +++ b/t/lib/TestApp/Controller/Action/Chained/ParentChain.pm @@ -10,8 +10,8 @@ use base qw/ Catalyst::Controller /; # sub child :Chained('.') :Args(1) { } -# Should be at /chained/rootdef/*/chained_rel -sub chained_rel :Chained('../rootdef') Args(0) { +# Should be at /chained/rootdef/*/chained_rel/*/* +sub chained_rel :Chained('../one') Args(2) { } # Should chain to loose in parent namespace - i.e. at /chained/loose/*/loose/*/* diff --git a/t/live_component_controller_action_chained.t b/t/live_component_controller_action_chained.t index e2fed7d..da3b98b 100644 --- a/t/live_component_controller_action_chained.t +++ b/t/live_component_controller_action_chained.t @@ -534,14 +534,14 @@ sub run_tests { local $TODO = "To Be Coded"; my @expected = qw[ TestApp::Controller::Action::Chained->begin - TestApp::Controller::Action::Chained->rootdef + TestApp::Controller::Action::Chained->one TestApp::Controller::Action::Chained::ParentChain->chained_rel TestApp::Controller::Action::Chained->end ]; my $expected = join( ", ", @expected ); - ok( my $response = request('http://localhost/chained/rootdef/1/chained_rel/3/2'), + ok( my $response = request('http://localhost/chained/one/1/chained_rel/3/2'), ":Chained('../action') chains to correct action" ); is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' );