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=ea5d2c35972bb2eeb4b9527b0d628a00a07695b6;hb=0b0aee670c39f8cb8f140eb62de9bfaf2c343a24;hp=fada74b5760646df840c91990f3cb4a1f6a52632;hpb=91955398bb1d5dba2bca876b1e21d2ea9b93919b;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 fada74b..ea5d2c3 100644 --- a/t/aggregate/live_component_controller_action_index_or_default.t +++ b/t/aggregate/live_component_controller_action_index_or_default.t @@ -10,10 +10,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,5 +30,14 @@ else { sub run_tests { is(get('/indexchained'), 'index_chained', ':Chained overrides index'); is(get('/indexprivate'), 'index_private', 'index : Private still works'); + +# 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'); }