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