X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_chained.t;h=53dca926fcca82efbf0a3f56f4549bd788f15c3b;hb=5ab21903f27011f38ec3e32ef2e649065e7adc1e;hp=8b0c1f9a2a2de549a73f3feb303d7171dbf43810;hpb=60dadd31309ce4a374c4dfc095c1655f706d28a5;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_component_controller_action_chained.t b/t/aggregate/live_component_controller_action_chained.t index 8b0c1f9..53dca92 100644 --- a/t/aggregate/live_component_controller_action_chained.t +++ b/t/aggregate/live_component_controller_action_chained.t @@ -1020,10 +1020,8 @@ sub run_tests { } # Test round tripping, specifically the / character %2F in uri_for: - # not being able to feed it back action + captureargs and args into uri for and result in the original - # request uri is a major piece of suck ;) - # FIXME - what about people who have code to hack around this and manually uri encode args and captures - # themselves, erk! + # not being able to feed it back action + captureargs and args into uri for + # and result in the original request uri is a major piece of suck ;) foreach my $thing ( ['foo', 'bar'], ['foo%2Fbar', 'baz'], @@ -1032,13 +1030,19 @@ sub run_tests { ['foo%2Fbar', 'baz%2Fquux', { foo => 'bar', 'baz' => 'quux%2Ffrood'}], ['foo%2Fbar', 'baz%2Fquux', { foo => 'bar', 'baz%2Ffnoo' => 'quux%2Ffrood'}], ) { - my $uri = 'http://localhost/chained/roundtrip_urifor/' . $thing->[0] . '/' . $thing->[1]; - $uri .= '?' . join('&', map { $_ .'='. $thing->[2]->{$_}} sort keys %{$thing->[2]}) if $thing->[2]; + my $path = '/chained/roundtrip_urifor/' . + $thing->[0] . '/' . $thing->[1]; + $path .= '?' . join('&', + map { $_ .'='. $thing->[2]->{$_}} + sort keys %{$thing->[2]}) if $thing->[2]; ok( my $content = - get($uri), - 'request ' . $uri . ' ok'); - is( $content, $uri, 'uri can round trip through uri_for' ); + get('http://localhost/' . $path), + 'request ' . $path . ' ok'); + # Just check that the path matches, as who the hell knows or cares + # where the app is based (live tests etc) + ok( index($content, $path) > 1, 'uri can round trip through uri_for' ); } } done_testing; +