From: Stuart Johnston Date: Mon, 12 Feb 2018 19:35:26 +0000 (-0800) Subject: Add tests for fragment handling X-Git-Tag: v5.90118~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=3662b13ee87e5dc4f2929b6c6f25bf9aa6565c86 Add tests for fragment handling --- diff --git a/t/aggregate/unit_core_uri_for.t b/t/aggregate/unit_core_uri_for.t index 887aa4a..7cacb0f 100644 --- a/t/aggregate/unit_core_uri_for.t +++ b/t/aggregate/unit_core_uri_for.t @@ -72,6 +72,12 @@ is( ); is( + Catalyst::uri_for( $context, '/bar', { param1 => 'value1' }, \'fragment' )->as_string, + 'http://127.0.0.1/foo/bar?param1=value1#fragment', + 'URI for path with fragment and query params 1' +); + +is( Catalyst::uri_for( $context, '0#fragment', { param1 => 'value1' } )->as_string, 'http://127.0.0.1/foo/yada/0?param1=value1#fragment', 'URI for path 0 with fragment and query params 1' @@ -292,4 +298,10 @@ is( 'overloaded object handled correctly' ); +is( + Catalyst::uri_for( $context, bless( { string => 'test' }, 'MyStringThing' ), \'fragment' ), + 'http://127.0.0.1/test#fragment', + 'overloaded object handled correctly' +); + done_testing;