Fix tests for ../action chaining.
Florian Ragwitz [Sun, 24 Aug 2008 19:31:53 +0000 (19:31 +0000)]
rootdef is an endaction; the tests expect two args for chained_rel.

t/lib/TestApp/Controller/Action/Chained/ParentChain.pm
t/live_component_controller_action_chained.t

index fd9d9e7..69614d5 100644 (file)
@@ -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/*/*
index e2fed7d..da3b98b 100644 (file)
@@ -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' );