fixes to uri_for_action on Chained
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Action / Chained.pm
index d93827d..9e6a93f 100644 (file)
@@ -71,6 +71,7 @@ sub priority_a1 :PathPart('chained/priority_a') :Chained('/') :Args { }
 sub priority_a2 :PathPart('chained/priority_a') :Chained('/') :CaptureArgs(1) { }
 sub priority_a2_end :PathPart('end') :Chained('priority_a2') :Args(1) { }
 
+
 #
 #   Priority: Fixed args vs. chained actions
 #
@@ -79,6 +80,14 @@ sub priority_b2 :PathPart('chained/priority_b') :Chained('/') :CaptureArgs(1) {
 sub priority_b2_end :PathPart('end') :Chained('priority_b2') :Args(1) { }
 
 #
+#   Priority: With no Args()
+#
+sub priority_c1 :PathPart('chained/priority_c') :Chained('/') :CaptureArgs(1) { }
+sub priority_c2 :PathPart('') :Chained('priority_c1') { }
+sub priority_c2_xyz :PathPart('xyz') :Chained('priority_c1')  { }
+
+
+#
 #   Optional specification of :Args in endpoint
 #
 sub opt_args :PathPart('chained/opt_args') :Chained('/') { }
@@ -132,6 +141,16 @@ sub chain_dt_b :Chained('chain_dt_a') :PathPart('end') :Args(1) { }
 #
 sub fw_dt_target :Private { }
 
+#
+#   Test multiple chained actions with no captures
+#
+sub empty_chain_a : Chained('/')             PathPart('chained/empty') CaptureArgs(0) { }
+sub empty_chain_b : Chained('empty_chain_a') PathPart('')              CaptureArgs(0) { }
+sub empty_chain_c : Chained('empty_chain_b') PathPart('')              CaptureArgs(0) { }
+sub empty_chain_d : Chained('empty_chain_c') PathPart('')              CaptureArgs(1) { }
+sub empty_chain_e : Chained('empty_chain_d') PathPart('')              CaptureArgs(0) { }
+sub empty_chain_f : Chained('empty_chain_e') PathPart('')              Args(1)        { }
+
 sub end :Private {
   my ($self, $c) = @_;
   my $out = join('; ', map { join(', ', @$_) }