X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Flive_engine_request_parameters.t;h=e4991263968c3414a8e05f9335056cf3bd8179d6;hp=d68ed0a70b8fc7c01ad3e96d9667dc12c96c0d00;hb=5f1c280839c7864938a8ddcd4c268d0c2719652e;hpb=1e3b6963a326204a5a58052e9a14a5770382ae5e diff --git a/t/aggregate/live_engine_request_parameters.t b/t/aggregate/live_engine_request_parameters.t index d68ed0a..e499126 100644 --- a/t/aggregate/live_engine_request_parameters.t +++ b/t/aggregate/live_engine_request_parameters.t @@ -1,5 +1,3 @@ -#!perl - use strict; use warnings; @@ -117,14 +115,21 @@ use HTTP::Request::Common; { my $creq; - my $parameters = { + my $body_parameters = { a => 1, blank => '', }; + my $query_parameters = { + 'query string' => undef + }; + my $parameters = { + %$body_parameters, + %$query_parameters + }; my $request = POST( 'http://localhost/dump/request/a/b?query+string', - 'Content' => $parameters, + 'Content' => $body_parameters, 'Content-Type' => 'application/x-www-form-urlencoded' ); @@ -132,6 +137,8 @@ use HTTP::Request::Common; ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' ); is( $creq->uri->query, 'query+string', 'Catalyst::Request POST query_string' ); is( $creq->query_keywords, 'query string', 'Catalyst::Request query_keywords' ); + is_deeply( $creq->query_parameters, $query_parameters, 'Catalyst::Request query_parameters' ); + is_deeply( $creq->body_parameters, $body_parameters, 'Catalyst::Request body_parameters' ); is_deeply( $creq->parameters, $parameters, 'Catalyst::Request parameters' ); ok( $response = request('http://localhost/dump/request/a/b?x=1&y=1&z=1'), 'Request' );