X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_engine_request_uri.t;h=943b2761a79a35358f10202df6da17f8e5b83a48;hb=933ba40380c86f9642bcfbee446a04d48efe4544;hp=9b5833eba77162247545d5a1ad9a04042961950d;hpb=fbb513f774337d5b48768491f0479b2b24e7fc4c;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_engine_request_uri.t b/t/live_engine_request_uri.t index 9b5833e..943b276 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 => 41; +use Test::More tests => 44; use Catalyst::Test 'TestApp'; use Catalyst::Request; @@ -88,7 +88,7 @@ my $creq; { ok( my $response = request('http://localhost/engine/request/uri/uri_with_object'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); - is( $response->header( 'X-Catalyst-Param-a' ), 'http://localhost/', 'param "a" ok' ); + like( $response->header( 'X-Catalyst-Param-a' ), qr(http://localhost[^/]*/), 'param "a" ok' ); } # test that uri_with is utf8 safe @@ -97,3 +97,10 @@ my $creq; ok( $response->is_success, 'Response Successful 2xx' ); like( $response->header( 'X-Catalyst-uri-with' ), qr/%E2%98%A0$/, 'uri_with ok' ); } + +# test with undef -- no warnings should be thrown +{ + ok( my $response = request("http://localhost/engine/request/uri/uri_with_undef"), 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + is( $response->header( 'X-Catalyst-warnings' ), 0, 'no warnings emitted' ); +}