X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=trunk%2Ft%2Faggregate%2Flive_component_controller_action_path_matchsingle.t;fp=trunk%2Ft%2Faggregate%2Flive_component_controller_action_path_matchsingle.t;h=beced91c911f6a3558023b0fbcf721055905dfc6;hb=ceae39c522c2145a453188867dd581062795ecee;hp=0000000000000000000000000000000000000000;hpb=f436bc1bece2bcc2a04138068e5c22e70d9d6d35;p=catagits%2FCatalyst-Runtime.git diff --git a/trunk/t/aggregate/live_component_controller_action_path_matchsingle.t b/trunk/t/aggregate/live_component_controller_action_path_matchsingle.t new file mode 100644 index 0000000..beced91 --- /dev/null +++ b/trunk/t/aggregate/live_component_controller_action_path_matchsingle.t @@ -0,0 +1,36 @@ +#!perl + +use strict; +use warnings; + +use FindBin; +use lib "$FindBin::Bin/../lib"; + +our $iters; + +BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } + +use Test::More; +use Catalyst::Test 'TestAppMatchSingleArg'; + +plan 'skip_all' if ( $ENV{CATALYST_SERVER} ); + +plan tests => 3*$iters; + +if ( $ENV{CAT_BENCHMARK} ) { + require Benchmark; + Benchmark::timethis( $iters, \&run_tests ); +} +else { + for ( 1 .. $iters ) { + run_tests(); + } +} + +sub run_tests { + { + is(get('/foo/bar/baz'), 'Path', 'multiple args matched :Path'); + is(get('/foo'), 'Path Args(1)', 'single arg matched :Path Args(1)'); + is(get('/foo/bar'), 'Path Args(2)', 'two args matched :Path Args(2)'); + } +}