X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_engine_request_uri.t;h=5027b9cf034ee550afb463e326941bd7f53fe7b1;hb=69eecfe56af710d0698539ea25dc1bc84282e013;hp=3bfaec47be5dac928176589b5c1f76ea263c9b15;hpb=bd917b94298b00325cb9db7551897c2471ca78ff;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_engine_request_uri.t b/t/live_engine_request_uri.t index 3bfaec4..5027b9c 100644 --- a/t/live_engine_request_uri.t +++ b/t/live_engine_request_uri.t @@ -1,4 +1,4 @@ -#!perl +#!perl use strict; use warnings; @@ -6,7 +6,7 @@ use warnings; use FindBin; use lib "$FindBin::Bin/lib"; -use Test::More tests => 35; +use Test::More tests => 41; use Catalyst::Test 'TestApp'; use Catalyst::Request; @@ -83,3 +83,17 @@ my $creq; is( $response->header( 'X-Catalyst-Param-a' ), '1', 'param "a" ok' ); is( $response->header( 'X-Catalyst-Param-b' ), '1', 'param "b" ok' ); } + +# test that uri_with replaces params (and preserves) +{ + ok( my $response = request('http://localhost/engine/request/uri/uri_with_object'), 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + like( $response->header( 'X-Catalyst-Param-a' ), qr(http://localhost[^/]*/), 'param "a" ok' ); +} + +# test that uri_with is utf8 safe +{ + ok( my $response = request("http://localhost/engine/request/uri/uri_with_utf8"), 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + like( $response->header( 'X-Catalyst-uri-with' ), qr/%E2%98%A0$/, 'uri_with ok' ); +}