X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Funit_core_uri_for.t;h=d3696a2e84d4553e1a1c995aebba84cb9d91cb63;hp=6732024c0c1cc521be87ab1c478f80f4bcaa3913;hb=3a6d7f15d1dcc08c06fb2ba77d608b6cf17edd66;hpb=7c1c4dc69062bd372f6611c5a2d3e054cf777d79 diff --git a/t/aggregate/unit_core_uri_for.t b/t/aggregate/unit_core_uri_for.t index 6732024..d3696a2 100644 --- a/t/aggregate/unit_core_uri_for.t +++ b/t/aggregate/unit_core_uri_for.t @@ -59,14 +59,11 @@ is( 'Plus is not encoded' ); -TODO: { - local $TODO = 'broken by 5.7008'; - is( - Catalyst::uri_for( $context, '/bar#fragment', { param1 => 'value1' } )->as_string, - 'http://127.0.0.1/foo/bar?param1=value1#fragment', - 'URI for path with fragment and query params' - ); -} +is( + Catalyst::uri_for( $context, '/bar#fragment', { param1 => 'value1' } )->as_string, + 'http://127.0.0.1/foo/bar?param1=value1#fragment', + 'URI for path with fragment and query params' +); # test with utf-8 is( @@ -181,5 +178,16 @@ TODO: { ); } -done_testing; +{ + package MyStringThing; + + use overload '""' => sub { $_[0]->{string} }, fallback => 1; +} +is( + Catalyst::uri_for( $context, bless( { string => 'test' }, 'MyStringThing' ) ), + 'http://127.0.0.1/test', + 'overloaded object handled correctly' +); + +done_testing;