X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_engine_request_uri.t;h=01a19faad22ddd53715aab157276022102445afd;hb=2055d9ad6304f9db74cb05ec8ee0146ce319e8e4;hp=fe15e9d232404970dc5241e4b7e3df997c750e18;hpb=0ce22ad477633bd8a0cd0a9d85d255d9683e1ea7;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_engine_request_uri.t b/t/live_engine_request_uri.t index fe15e9d..01a19fa 100644 --- a/t/live_engine_request_uri.t +++ b/t/live_engine_request_uri.t @@ -6,7 +6,7 @@ use warnings; use FindBin; use lib "$FindBin::Bin/lib"; -use Test::More tests => 54; +use Test::More tests => 49; use Catalyst::Test 'TestApp'; use Catalyst::Request; @@ -62,8 +62,8 @@ SKIP: ok( my $response = request('http://localhost/engine/request/uri?a=1;a=2;b=3'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' ); - is( $creq->{uri}->query, 'a=1;a=2;b=3', 'Query string ok' ); - is_deeply( $creq->{parameters}, $parameters, 'Parameters ok' ); + is( $creq->uri->query, 'a=1;a=2;b=3', 'Query string ok' ); + is_deeply( $creq->parameters, $parameters, 'Parameters ok' ); } # test that query params are unescaped properly @@ -71,8 +71,8 @@ SKIP: ok( my $response = request('http://localhost/engine/request/uri?text=Catalyst%20Rocks'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' ); - is( $creq->{uri}->query, 'text=Catalyst%20Rocks', 'Query string ok' ); - is( $creq->{parameters}->{text}, 'Catalyst Rocks', 'Unescaped param ok' ); + is( $creq->uri->query, 'text=Catalyst%20Rocks', 'Query string ok' ); + is( $creq->parameters->{text}, 'Catalyst Rocks', 'Unescaped param ok' ); } # test that uri_with adds params @@ -120,12 +120,3 @@ SKIP: is( $response->header( 'X-Catalyst-warnings' ), 0, 'no warnings emitted' ); } - -# test that query params are unescaped properly with '+' -{ - ok( my $response = request('http://localhost/engine/request/uri?text=C%2B%2B+lang'), 'Request' ); - ok( $response->is_success, 'Response Successful 2xx' ); - ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' ); - is( $creq->{uri}->query, 'text=C%2B%2B+lang', 'Query string ok' ); - is( $creq->{parameters}->{text}, 'C++ lang', 'Unescaped param has pluses in it' ); -}