X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FAction%2FForward.pm;h=f966898ae84dd28d223dc430458777838f50e0e3;hp=4fdf5eada4b3312cb0ff27e34350efe5c16e8654;hb=66741f94ac93b7ba0989db3556d0e3fe36c1be87;hpb=a1dad9c1cde458c1b9429ceca83691607b1ee9c2 diff --git a/t/lib/TestApp/Controller/Action/Forward.pm b/t/lib/TestApp/Controller/Action/Forward.pm index 4fdf5ea..f966898 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,17 +25,15 @@ sub four : Private { sub five : Local { my ( $self, $c ) = @_; - $c->forward('TestApp::View::Dump::Request'); + $c->forward('View::Dump::Request'); } - 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'); @@ -44,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] ); } @@ -65,4 +63,21 @@ 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 ); +} + 1;