X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FRoot.pm;h=8541e2ec67395cdbef9c0d674b637d023210a902;hp=b626bdb0554713e20f20d29b9bf48ce92b7b01ff;hb=82010ea176741c7a4f2baf3f6f27377b1d9f6b15;hpb=550464108eada19dba470ec5d17fc849399fdab0 diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm index b626bdb..8541e2e 100644 --- a/t/lib/TestApp/Controller/Root.pm +++ b/t/lib/TestApp/Controller/Root.pm @@ -83,6 +83,8 @@ sub test_redirect :Global { # Don't set content_type # Don't set body $c->res->redirect('/go_here'); + # route for /go_here doesn't exist + # it is only for checking HTTP response code, content-type etc. } sub test_redirect_uri_for :Global { @@ -90,6 +92,8 @@ sub test_redirect_uri_for :Global { # Don't set content_type # Don't set body $c->res->redirect($c->uri_for('/go_here')); + # route for /go_here doesn't exist + # it is only for checking HTTP response code, content-type etc. } sub test_redirect_with_contenttype :Global { @@ -97,6 +101,8 @@ sub test_redirect_with_contenttype :Global { # set content_type but don't set body $c->res->content_type('image/jpeg'); $c->res->redirect('/go_here'); + # route for /go_here doesn't exist + # it is only for checking HTTP response code, content-type etc. } sub test_redirect_with_content :Global { @@ -104,6 +110,33 @@ sub test_redirect_with_content :Global { $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'); + # route for /go_here doesn't exist + # it is only for checking HTTP response code, content-type etc. +} + +sub test_remove_body_with_304 :Global { + my ($self, $c) = @_; + $c->res->status(304); + $c->res->content_type('text/html'); + $c->res->body("Body should not be set"); +} + +sub test_remove_body_with_204 :Global { + my ($self, $c) = @_; + $c->res->status(204); + $c->res->content_type('text/html'); + $c->res->body("Body should not be set"); +} + +sub test_remove_body_with_100 :Global { + my ($self, $c) = @_; + $c->res->status(100); + $c->res->body("Body should not be set"); +} + +sub test_nobody_with_100 :Global { + my ($self, $c) = @_; + $c->res->status(100); } sub end : Private {