X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_local.t;h=052c9c1ba14ed70f859ff5a01ed887b2d08729dc;hp=ae98831acfdf8e31b5b9ec3e7781ec04de82272d;hb=10542b5178b2fa036e0658111523ea68a7a04437;hpb=ae29b412955743885e80350085167b54b69672da diff --git a/t/aggregate/live_component_controller_action_local.t b/t/aggregate/live_component_controller_action_local.t index ae98831..052c9c1 100644 --- a/t/aggregate/live_component_controller_action_local.t +++ b/t/aggregate/live_component_controller_action_local.t @@ -1,5 +1,3 @@ -#!perl - use strict; use warnings; @@ -10,7 +8,7 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } -use Test::More tests => 32*$iters; +use Test::More tests => 34*$iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -129,10 +127,23 @@ sub run_tests { 'TestApp::Controller::Action::Local', 'Test Class' ); - like( - $response->content, - qr~arguments => \[\s*'foo/bar'\s*\]~, - "Parameters don't split on %2F" - ); + my $content = $response->content; + { + local $@; + my $request = eval $content; + if ($@) { + fail("Content cannot be unserialized: $@ $content"); + } + else { + is_deeply $request->arguments, ['foo/bar'], "Parameters don't split on %2F"; + } + } + } + + { + ok( my $content = get('http://locahost/action/local/five/foo%2Fbar%3B'), + 'request with URI-encoded arg'); + # this is the CURRENT behavior + like( $content, qr{'foo/bar;'}, 'args for Local actions URI-decoded' ); } }