additional test
Nilson Santos Figueiredo JĂșnior [Tue, 28 Jul 2009 00:17:13 +0000 (00:17 +0000)]
t/ESITest/lib/ESITest/Controller/Root.pm
t/ESITest/root/index.tt

index a19c771..db509be 100644 (file)
@@ -87,6 +87,25 @@ sub time_args_without_capture : Chained('base') PathPart('time') Args(1) {
     $c->stash->{template} = 'time_include.tt';
 }
 
+sub time_args_no_chained : Path('time_args_no_chained') Args {
+    my ($self, $c, @args) = @_;
+
+    my $params = $c->req->params;
+
+    $c->stash->{current_time} = localtime();
+
+    my $additional = '';
+    for my $key (keys %$params) {
+        $additional .= " | $key = $params->{$key} | "
+    }
+
+    $additional .= " No Chained Args: " . join ', ', @args;
+
+    $c->stash->{additional} = $additional;
+
+    $c->stash->{template} = 'time_include.tt';
+}
+
 sub end : ActionClass('RenderView') {}
 
 1;
index 913c888..0e88e0a 100644 (file)
@@ -41,3 +41,9 @@ Test CaptureArgs and Args interaction (ESI):<br/><br/>
 
 [% subinclude_using('ESI', '/time_args_without_capture', 'regular_arg', { query_arg => 'val' }) %]<br/>
 (using: [% c.uri_for( c.controller.action_for('time_args_without_capture'), 'regular_arg', { query_arg => 'val' } ) %])<br/>
+
+<br/><br/><br/>
+
+Test Args when Chained is not being used:
+[% subinclude_using('SubRequest', '/time_args_no_chained', 'regular_arg1', 'regular_arg2', { query_arg => 'val' } ) %]<br/>
+(using: [% c.uri_for( c.controller.action_for('time_args_no_chained'), 'regular_arg1', 'regular_arg2', { query_arg => 'val' } ) %])<br/>