X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FRoot.pm;h=c1bd6d522ef93a6557a3af352c0663560afd42ae;hb=11e7af55dda3f3acd9ab3b484b54180f76b253df;hp=ce3ee757de9a07f79b8a3ebcc83021356204f89d;hpb=ffb438031c2764e94ffe9e9af68a1b172eac4740;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm index ce3ee75..c1bd6d5 100644 --- a/t/lib/TestApp/Controller/Root.pm +++ b/t/lib/TestApp/Controller/Root.pm @@ -56,6 +56,7 @@ sub loop_test : Local { sub recursion_test : Local { my ( $self, $c ) = @_; + no warnings 'recursion'; $c->forward( 'recursion_test' ); } @@ -82,6 +83,28 @@ sub body_semipredicate : Local { $c->res->body('Body'); } + +sub test_redirect :Global { + my ($self, $c) = @_; + # Don't set content_type + # Don't set body + $c->res->redirect('/go_here'); +} + +sub test_redirect_with_contenttype :Global { + my ($self, $c) = @_; + # set content_type but don't set body + $c->res->content_type('image/jpeg'); + $c->res->redirect('/go_here'); +} + +sub test_redirect_with_content :Global { + my ($self, $c) = @_; + $c->res->content_type('text/plain'); + $c->res->body('Please kind sir, I beg you to go to /go_here.'); + $c->res->redirect('/go_here'); +} + sub end : Private { my ($self,$c) = @_; }