7 use lib "$FindBin::Bin/../../../lib";
11 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; }
13 use Test::More tests => 12*$iters;
14 use Catalyst::Test 'TestApp';
16 if ( $ENV{CAT_BENCHMARK} ) {
18 Benchmark::timethis( -$iters, \&run_tests );
30 request('http://localhost/action/path/a path with spaces'),
33 ok( $response->is_success, 'Response Successful 2xx' );
34 is( $response->content_type, 'text/plain', 'Response Content-Type' );
36 $response->header('X-Catalyst-Action'),
37 'action/path/a path with spaces',
41 $response->header('X-Test-Class'),
42 'TestApp::Controller::Action::Path',
47 qr/^bless\( .* 'Catalyst::Request' \)$/s,
48 'Content is a serialized Catalyst::Request'
53 ok( my $response = request('http://localhost/action/path/åäö'),
55 ok( $response->is_success, 'Response Successful 2xx' );
56 is( $response->content_type, 'text/plain', 'Response Content-Type' );
57 is( $response->header('X-Catalyst-Action'),
58 'action/path/åäö', 'Test Action' );
60 $response->header('X-Test-Class'),
61 'TestApp::Controller::Action::Path',
66 qr/^bless\( .* 'Catalyst::Request' \)$/s,
67 'Content is a serialized Catalyst::Request'