Release commit for 5.90128
[catagits/Catalyst-Runtime.git] / t / aggregate / live_recursion.t
1 use strict;
2 use warnings;
3
4 use FindBin;
5 use lib "$FindBin::Bin/../lib";
6
7 use Test::More tests => 3;
8 use Catalyst::Test 'TestApp';
9
10 local $^W = 0;
11
12 SKIP:
13 {
14     # Net::HTTP::Methods crashes when talking to a remote server because this
15     # test causes a very long header line to be sent
16     if ( $ENV{CATALYST_SERVER} ) {
17         skip 'Using remote server', 3;
18     }
19
20     ok( my $response = request('http://localhost/recursion_test'), 'Request' );
21     ok( !$response->is_success, 'Response Not Successful' );
22     is( $response->header('X-Catalyst-Error'), 'Deep recursion detected calling "/recursion_test"', 'Deep Recursion Detected' );
23 }
24