5 use lib "$FindBin::Bin/../lib";
7 use Test::More tests => 18;
8 use Catalyst::Test 'TestApp';
10 close STDERR; # i'm naughty :)
13 ok( my $response = request('http://localhost/engine/response/errors/one'),
15 ok( $response->is_error, 'Response Server Error 5xx' );
16 is( $response->code, 500, 'Response Code' );
17 is( $response->content_type, 'text/html', 'Response Content-Type' );
18 is( $response->header('X-Catalyst-Action'),
19 'engine/response/errors/one', 'Test Action' );
21 $response->header('X-Catalyst-Error'),
22 qr/^Caught exception/,
28 ok( my $response = request('http://localhost/engine/response/errors/two'),
30 ok( $response->is_error, 'Response Server Error 5xx' );
31 is( $response->code, 500, 'Response Code' );
32 is( $response->content_type, 'text/html', 'Response Content-Type' );
33 is( $response->header('X-Catalyst-Action'),
34 'engine/response/errors/two', 'Test Action' );
36 $response->header('X-Catalyst-Error'),
37 qr/^Couldn't forward to/,
43 ok( my $response = request('http://localhost/engine/response/errors/three'),
45 ok( $response->is_error, 'Response Server Error 5xx' );
46 is( $response->code, 500, 'Response Code' );
47 is( $response->content_type, 'text/html', 'Response Content-Type' );
49 $response->header('X-Catalyst-Action'),
50 'engine/response/errors/three',
54 $response->header('X-Catalyst-Error'),
55 qr/I'm going to die!/,