Merge branch 'register_actions'
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Action / Chained / Foo.pm
index 4ff9b20..2f917c1 100644 (file)
@@ -13,16 +13,26 @@ sub spoon :Chained('.') :Args(0) { }
 #
 #   Root for a action in a "parent" controller
 #
-sub higher_root :PathPart('chained/higher_root') :Chained('/') :Captures(1) { }
+sub higher_root :PathPart('chained/higher_root') :Chained('/') :CaptureArgs(1) { }
 
 #
 #   Parent controller -> this subcontroller -> parent controller test
 #
-sub pcp2 :Chained('/action/chained/pcp1') :Captures(1) { }
+sub pcp2 :Chained('/action/chained/pcp1') :CaptureArgs(1) { }
 
 #
 #   Controllers not in parent/child relation. This tests the end.
 #
 sub cross2 :PathPart('end') :Chained('/action/chained/bar/cross1') :Args(1) { }
 
+#
+#   Create a uri to the root index
+#
+sub to_root : Chained('/') PathPart('action/chained/to_root') {
+    my ( $self, $c ) = @_;
+    my $uri = $c->uri_for_action('/chain_root_index');
+    $c->res->body( "URI:$uri" );
+    $c->stash->{no_end}++;
+}
+
 1;