use inlined module hiding in tests
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_action_index_or_default.t
index d385add..e984152 100644 (file)
@@ -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');
 }