7 use lib "$FindBin::Bin/lib";
9 use Test::More tests => 18;
10 use Catalyst::Test 'TestApp';
12 close STDERR; # i'm naughty :)
15 ok( my $response = request('http://localhost/engine/response/errors/one'),
17 ok( $response->is_error, 'Response Server Error 5xx' );
18 is( $response->code, 500, 'Response Code' );
19 is( $response->content_type, 'text/html', 'Response Content-Type' );
20 is( $response->header('X-Catalyst-Action'),
21 'engine/response/errors/one', 'Test Action' );
23 $response->header('X-Catalyst-Error'),
24 qr/^Caught exception/,
30 ok( my $response = request('http://localhost/engine/response/errors/two'),
32 ok( $response->is_error, 'Response Server Error 5xx' );
33 is( $response->code, 500, 'Response Code' );
34 is( $response->content_type, 'text/html', 'Response Content-Type' );
35 is( $response->header('X-Catalyst-Action'),
36 'engine/response/errors/two', 'Test Action' );
38 $response->header('X-Catalyst-Error'),
39 qr/^Couldn't forward to/,
45 ok( my $response = request('http://localhost/engine/response/errors/three'),
47 ok( $response->is_error, 'Response Server Error 5xx' );
48 is( $response->code, 500, 'Response Code' );
49 is( $response->content_type, 'text/html', 'Response Content-Type' );
51 $response->header('X-Catalyst-Action'),
52 'engine/response/errors/three',
56 $response->header('X-Catalyst-Error'),
57 qr/I'm going to die!/,