From: Upasana Date: Thu, 9 Jan 2014 17:10:13 +0000 (+0530) Subject: Added routes for testing correct working of Plack::Middleware::RemoveRedundantBody... X-Git-Tag: 5.90060~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=0d227c71bc7a40edab38bb4d19a60caabb82c6de Added routes for testing correct working of Plack::Middleware::RemoveRedundantBody with Catalyst --- diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm index 5895223..c3ab341 100644 --- a/t/lib/TestApp/Controller/Root.pm +++ b/t/lib/TestApp/Controller/Root.pm @@ -114,6 +114,32 @@ sub test_redirect_with_content :Global { # 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"); + $c->res->content_type('text/html'); +} + +sub test_nobody_with_100 :Global { + my ($self, $c) = @_; + $c->res->status(100); +} + sub end : Private { my ($self,$c) = @_; }