Test uri_for with path = 0
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_action_path_matchsingle.t
CommitLineData
9dac01c7 1use strict;
2use warnings;
3
4use FindBin;
5use lib "$FindBin::Bin/../lib";
6
7our $iters;
8
9BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
10
81f25ce6 11use Test::More;
9dac01c7 12use Catalyst::Test 'TestAppMatchSingleArg';
13
81f25ce6 14plan 'skip_all' if ( $ENV{CATALYST_SERVER} );
15
16plan tests => 3*$iters;
17
9dac01c7 18if ( $ENV{CAT_BENCHMARK} ) {
19 require Benchmark;
20 Benchmark::timethis( $iters, \&run_tests );
21}
22else {
23 for ( 1 .. $iters ) {
24 run_tests();
25 }
26}
27
28sub run_tests {
29 {
cdf573a6 30 is(get('/foo/bar/baz'), 'Path', 'multiple args matched :Path');
9dac01c7 31 is(get('/foo'), 'Path Args(1)', 'single arg matched :Path Args(1)');
cdf573a6 32 is(get('/foo/bar'), 'Path Args(2)', 'two args matched :Path Args(2)');
9dac01c7 33 }
34}