multiline parameters
John Napiorkowski [Tue, 10 Aug 2010 21:17:38 +0000 (17:17 -0400)]
t/100_complex.t
t/lib/TestApp/Controller/ActionParams.pm

index 001756f..680353d 100644 (file)
@@ -70,5 +70,6 @@ is get('/foo/lower/down/the/param/3/road/5'), 8, 'capture args and block under w
 # Make sure action roles with parameters pass params to attributes
 is get('/actionparams/first'), 'action_args_first: 100,101', 'actionrole with params';
 is get('/actionparams/second'), 'action_args_second: 200,201', 'actionrole with params (part two)';
+is get('/actionparams/third'), 'action_args_third: 300,301', 'actionrole with params (part three)';
 
 done_testing;
index 41b8bee..aff3e0c 100644 (file)
@@ -34,5 +34,14 @@ controller ::Controller::ActionParams {
         $ctx->response->body("action_args_second: $p1,$p2");
     }
 
+    action third under base
+    with hasActionParams(
+        p1=>300,
+        p2=>301,
+    ) is final {
+        my $p1 = $ctx->controller->action_for('third')->p1;
+        my $p2 = $ctx->controller->action_for('third')->p2;
+        $ctx->response->body("action_args_third: $p1,$p2");
+    }
 }