X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FAction%2FForward.pm;h=c6be7314417b1967bb645a0f76aced9ec54a615c;hb=86d993abfe04d54984bca9c1c5a91139ec1eec42;hp=6a74ddd64f64abff6adea83af95f1e746ec433b5;hpb=a1c8f974699a855b480845bb0e0afb570f346e99;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Controller/Action/Forward.pm b/t/lib/TestApp/Controller/Action/Forward.pm index 6a74ddd..c6be731 100644 --- a/t/lib/TestApp/Controller/Action/Forward.pm +++ b/t/lib/TestApp/Controller/Action/Forward.pm @@ -15,7 +15,7 @@ sub two : Private { sub three : Local { my ( $self, $c ) = @_; - $c->forward('four'); + $c->forward( $self, 'four' ); } sub four : Private { @@ -25,22 +25,15 @@ sub four : Private { sub five : Local { my ( $self, $c ) = @_; - $c->forward('TestApp::View::Dump::Request'); + $c->forward('View::Dump::Request'); } -sub six : Local { - my ( $self, $c ) = @_; - $c->forward('TestApp::View::Dump::False'); -} - - sub jojo : Local { my ( $self, $c ) = @_; $c->forward('one'); - $c->forward('three'); + $c->forward( $c->controller('Action::Forward'), 'three' ); } - sub inheritance : Local { my ( $self, $c ) = @_; $c->forward('/action/inheritance/a/b/default'); @@ -49,12 +42,12 @@ sub inheritance : Local { sub global : Local { my ( $self, $c ) = @_; - $c->forward( '/global_action' ); + $c->forward('/global_action'); } sub with_args : Local { my ( $self, $c, $orig ) = @_; - $c->forward( 'args',[qq/new/] ); + $c->forward( 'args', [qq/new/] ); $c->res->body( $c->req->args->[0] ); } @@ -70,4 +63,26 @@ sub args : Local { die "passed argument does not match args" unless $val eq $c->req->args->[0]; } +sub args_embed_relative : Local { + my ( $self, $c ) = @_; + $c->forward('embed/ok'); +} + +sub args_embed_absolute : Local { + my ( $self, $c ) = @_; + $c->forward('/action/forward/embed/ok'); +} + +sub embed : Local { + my ( $self, $c, $ok ) = @_; + + $ok ||= 'not ok'; + $c->res->body($ok); +} + +sub class_forward_test_action : Local { + my ( $self, $c ) = @_; + $c->forward(qw/TestApp class_forward_test_method/); +} + 1;