Test uri_for with path = 0
[catagits/Catalyst-Runtime.git] / t / aggregate / custom_live_component_controller_action_auto_doublebug.t
CommitLineData
7f23827b 1use strict;
2use warnings;
3
4use FindBin;
b1ead5a2 5use lib "$FindBin::Bin/../lib";
7f23827b 6
7our $iters;
8
6b25e555 9BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
7f23827b 10
11use Test::More tests => 3*$iters;
12use Catalyst::Test 'TestAppDoubleAutoBug';
13
14if ( $ENV{CAT_BENCHMARK} ) {
15 require Benchmark;
16 Benchmark::timethis( $iters, \&run_tests );
17}
18else {
19 for ( 1 .. $iters ) {
20 run_tests();
21 }
22}
737a1e42 23
7f23827b 24sub run_tests {
943ca690 25 SKIP:
7f23827b 26 {
943ca690 27 if ( $ENV{CATALYST_SERVER} ) {
28 skip 'Using remote server', 3;
29 }
737a1e42 30
943ca690 31 {
32 my @expected = qw[
cf013d38 33 TestAppDoubleAutoBug::Controller::Root->auto
34 TestAppDoubleAutoBug::Controller::Root->default
35 TestAppDoubleAutoBug::Controller::Root->end
943ca690 36 ];
737a1e42 37
943ca690 38 my $expected = join( ", ", @expected );
737a1e42 39
943ca690 40 ok( my $response = request('http://localhost/action/auto/one'), 'auto + local' );
41 is( $response->header('X-Catalyst-Executed'),
42 $expected, 'Executed actions' );
43 is( $response->content, 'default, auto=1', 'Content OK' );
44 }
7f23827b 45 }
46}