[Catalyst-commits] r11808 -
Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2/t/aggregate
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Thu Nov 12 23:41:17 GMT 2009
Author: t0m
Date: 2009-11-12 23:41:17 +0000 (Thu, 12 Nov 2009)
New Revision: 11808
Modified:
Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2/t/aggregate/live_component_controller_action_chained.t
Log:
Tidy up a bit
Modified: Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2/t/aggregate/live_component_controller_action_chained.t
===================================================================
--- Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2/t/aggregate/live_component_controller_action_chained.t 2009-11-12 19:45:46 UTC (rev 11807)
+++ Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2/t/aggregate/live_component_controller_action_chained.t 2009-11-12 23:41:17 UTC (rev 11808)
@@ -1020,10 +1020,8 @@
}
# 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,8 +1030,11 @@
['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 $uri = 'http://localhost/chained/roundtrip_urifor/' .
+ $thing->[0] . '/' . $thing->[1];
+ $uri .= '?' . join('&',
+ map { $_ .'='. $thing->[2]->{$_}}
+ sort keys %{$thing->[2]}) if $thing->[2];
ok( my $content =
get($uri),
'request ' . $uri . ' ok');
@@ -1042,3 +1043,4 @@
}
done_testing;
+
More information about the Catalyst-commits
mailing list