7 use lib "$FindBin::Bin/../../../lib";
11 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; }
13 use Test::More tests => 7*$iters;
14 use Catalyst::Test 'TestApp';
16 if ( $ENV{CAT_BENCHMARK} ) {
18 Benchmark::timethis( -$iters, \&run_tests );
30 TestApp::Controller::Action::Begin->begin
31 TestApp::Controller::Action::Begin->default
32 TestApp::View::Dump::Request->process
35 my $expected = join( ", ", @expected );
37 ok( my $response = request('http://localhost/action/begin'),
39 ok( $response->is_success, 'Response Successful 2xx' );
40 is( $response->content_type, 'text/plain', 'Response Content-Type' );
41 is( $response->header('X-Catalyst-Action'), 'default', 'Test Action' );
43 $response->header('X-Test-Class'),
44 'TestApp::Controller::Action::Begin',
47 is( $response->header('X-Catalyst-Executed'),
48 $expected, 'Executed actions' );
49 like( $response->content, qr/'Catalyst::Request'/,
50 'Content is a serialized Catalyst::Request' );