From: Tomas Doran Date: Thu, 12 Nov 2009 23:56:36 +0000 (+0000) Subject: Don't fail the live tests by only looking for http://localhost/etc.. X-Git-Tag: 5.80014~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=9b7d26c74ea27e325f462a1f0e629a23809a4b8d Don't fail the live tests by only looking for localhost/etc.. --- diff --git a/t/aggregate/live_component_controller_action_chained.t b/t/aggregate/live_component_controller_action_chained.t index 157f016..53dca92 100644 --- a/t/aggregate/live_component_controller_action_chained.t +++ b/t/aggregate/live_component_controller_action_chained.t @@ -1030,15 +1030,17 @@ 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/' . + my $path = '/chained/roundtrip_urifor/' . $thing->[0] . '/' . $thing->[1]; - $uri .= '?' . join('&', + $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' ); } }