Create branch register_actions.
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Action / Forward.pm
index f966898..062d6a1 100644 (file)
@@ -15,7 +15,7 @@ sub two : Private {
 
 sub three : Local {
     my ( $self, $c ) = @_;
-    $c->forward($self, 'four');
+    $c->forward( $self, 'four' );
 }
 
 sub four : Private {
@@ -31,7 +31,7 @@ sub five : Local {
 sub jojo : Local {
     my ( $self, $c ) = @_;
     $c->forward('one');
-    $c->forward($c->controller('Action::Forward'), 'three');
+    $c->forward( $c->controller('Action::Forward'), 'three' );
 }
 
 sub inheritance : Local {
@@ -57,6 +57,11 @@ sub with_method_and_args : Local {
     $c->res->body( $c->req->args->[0] );
 }
 
+sub to_action_object : Local {
+    my ( $self, $c ) = @_;
+    $c->forward($self->action_for('embed'), [qw/mtfnpy/]);
+}
+
 sub args : Local {
     my ( $self, $c, $val ) = @_;
     die "Expected argument 'new', got '$val'" unless $val eq 'new';
@@ -65,19 +70,29 @@ sub args : Local {
 
 sub args_embed_relative : Local {
     my ( $self, $c ) = @_;
-    $c->forward( 'embed/ok' );
+    $c->forward('embed/ok');
 }
 
 sub args_embed_absolute : Local {
     my ( $self, $c ) = @_;
-    $c->forward( '/action/forward/embed/ok' );
+    $c->forward('/action/forward/embed/ok');
 }
 
 sub embed : Local {
     my ( $self, $c, $ok ) = @_;
-    
+
     $ok ||= 'not ok';
-    $c->res->body( $ok );
+    $c->res->body($ok);
+}
+
+sub class_forward_test_action : Local {
+    my ( $self, $c ) = @_;
+    $c->forward(qw/TestApp class_forward_test_method/);
+}
+
+sub forward_to_uri_check : Local {
+    my ( $self, $c ) = @_;
+    $c->forward( 'Action::ForwardTo', 'uri_check' );
 }
 
 1;