nicer action sorting for Path
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_action_index_or_default.t
diff --git a/t/aggregate/live_component_controller_action_index_or_default.t b/t/aggregate/live_component_controller_action_index_or_default.t
new file mode 100644 (file)
index 0000000..d385add
--- /dev/null
@@ -0,0 +1,32 @@
+#!perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+our $iters;
+
+BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
+
+use Test::More tests => 3*$iters;
+
+use Catalyst::Test 'TestAppIndexDefault';
+
+if ( $ENV{CAT_BENCHMARK} ) {
+    require Benchmark;
+    Benchmark::timethis( $iters, \&run_tests );
+}
+else {
+    for ( 1 .. $iters ) {
+        run_tests();
+    }
+}
+
+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');
+}