X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_chained.t;h=d6fcfedcc7eaf489e089e9faeca0ccb3c6ecae44;hb=cd61f3ab24b7dcc59068c35d62ddb4bb9b9162c8;hp=6f0181233912fd42eccdd102ce1f83f086dac425;hpb=1279064aaba5218247db3d0e49215802187ee41e;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 6f01812..d6fcfed 100644 --- a/t/aggregate/live_component_controller_action_chained.t +++ b/t/aggregate/live_component_controller_action_chained.t @@ -11,6 +11,8 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } use Test::More; +use URI; +use URI::QueryParam; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -1108,9 +1110,14 @@ sub run_tests { ok( my $content = get('http://localhost/' . $path), 'request ' . $path . ' ok'); + my $exp = URI->new('http://localhost:3000' . $path); + my ($want) = $content =~ m{/chained/(.*)}; + my $got = URI->new('http://localhost:3000/chained/' . $want); # 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' ) + is $got->path, $exp->path, "uri $path can round trip through uri_for (path)" + or diag("Expected $path, got $content"); + is_deeply $got->query_form_hash, $exp->query_form_hash, "uri $path can round trip through uri_for (query)" or diag("Expected $path, got $content"); }