X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_index_or_default.t;h=e9841526e51ca0348c447b2647745ec31afb7a61;hb=88e5a8b0c4d28e46b8ba6b6b9567063e57af9063;hp=d385add9d8c4bc2add14dc9059cc431a65dccec2;hpb=05b47f2e6357bc7f1622e6b2cf730ad5bbeb993f;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_component_controller_action_index_or_default.t b/t/aggregate/live_component_controller_action_index_or_default.t index d385add..e984152 100644 --- a/t/aggregate/live_component_controller_action_index_or_default.t +++ b/t/aggregate/live_component_controller_action_index_or_default.t @@ -1,5 +1,3 @@ -#!perl - use strict; use warnings; @@ -10,10 +8,13 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } -use Test::More tests => 3*$iters; - +use Test::More; use Catalyst::Test 'TestAppIndexDefault'; +plan 'skip_all' if ( $ENV{CATALYST_SERVER} ); + +plan tests => 6*$iters; + if ( $ENV{CAT_BENCHMARK} ) { require Benchmark; Benchmark::timethis( $iters, \&run_tests ); @@ -27,6 +28,14 @@ else { sub run_tests { is(get('/indexchained'), 'index_chained', ':Chained overrides index'); is(get('/indexprivate'), 'index_private', 'index : Private still works'); - is(get('/defaultandpath/path_one_arg'), 'path_one_arg', - 'Path overrides default'); + +# test :Path overriding default + is(get('/one_arg'), 'path_one_arg', ':Path overrides default'); + is(get('/one_arg/foo/bar'), 'default', 'default still works'); + +# now the same thing with a namespace, and a trailing / on the :Path + is(get('/default/one_arg'), 'default_path_one_arg', + ':Path overrides default'); + is(get('/default/one_arg/foo/bar'), 'default_default', + 'default still works'); }