More v5.17.5-518-g7dc8663 related fixing
Tomas Doran [Tue, 4 Dec 2012 21:23:03 +0000 (21:23 +0000)]
t/aggregate/live_component_controller_action_chained.t

index 6f01812..5dd2293 100644 (file)
@@ -1108,9 +1108,15 @@ sub run_tests {
         ok( my $content =
             get('http://localhost/' . $path),
             'request ' . $path . ' ok');
+        my $exp = URI->new('http://localhost:3000' . $path);
+        my $got = URI->new($content);
         # 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");
+        my %got_q = map { split /=/ } split /\&/, ($got->query||'');
+        my %exp_q = map { split /=/ } split /\&/, ($exp->query||'');
+        is_deeply \%got_q, \%exp_q, "uri $path can round trip through uri_for (query)"
             or diag("Expected $path, got $content");
     }