X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_engine_request_body.t;h=954291c4c7cb967fee08e61ee70150ea39c4cef6;hb=a08216220afae9a832742a5154b96997fef11b26;hp=1897af3486f554f3e23eb6b69bda0372ef9c57be;hpb=6e3de58fc7d0a4302fe9791c36346839ad91fb12;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_engine_request_body.t b/t/aggregate/live_engine_request_body.t index 1897af3..954291c 100644 --- a/t/aggregate/live_engine_request_body.t +++ b/t/aggregate/live_engine_request_body.t @@ -1,12 +1,11 @@ #!perl - use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; -use Test::More tests => 21; +use Test::More tests => 23; use Catalyst::Test 'TestApp'; use Catalyst::Request; @@ -39,6 +38,7 @@ use HTTP::Request::Common; isa_ok( $creq, 'Catalyst::Request' ); is( $creq->method, 'POST', 'Catalyst::Request method' ); is( $creq->content_type, 'text/plain', 'Catalyst::Request Content-Type' ); + is( $creq->{__body_type}, 'File::Temp' ); is( $creq->content_length, $request->content_length, 'Catalyst::Request Content-Length' ); } @@ -72,6 +72,7 @@ use HTTP::Request::Common; isa_ok( $creq, 'Catalyst::Request' ); is( $creq->method, 'POST', 'Catalyst::Request method' ); is( $creq->content_type, 'text/plain', 'Catalyst::Request Content-Type' ); + is( $creq->{__body_type}, 'File::Temp' ); is( $creq->content_length, $request->content_length, 'Catalyst::Request Content-Length' ); } @@ -79,16 +80,13 @@ use HTTP::Request::Common; # 5.80 regression, see note in Catalyst::Plugin::Test::Plugin { my $request = GET( - 'http://localhost/have_req_body_in_prepare_action', + 'http://localhost/dump/response', 'Content-Type' => 'text/plain', 'Content' => 'x' x 100_000 ); ok( my $response = request($request), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); - TODO: { - local $TODO = 'On demand request body parsing in prepare_action broken'; - like( $response->content, qr/^[1-9]/, 'Has body' ); - } + ok( $response->header('X-Have-Request-Body'), 'X-Have-Request-Body set' ); }