Skip the live_stats test on remote servers
[catagits/Catalyst-Runtime.git] / t / live_stats.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;
10 use Catalyst::Test 'TestAppStats';
11
12 if ( $ENV{CATALYST_SERVER} ) {
13     plan skip_all => 'Using remote server';
14 }
15 else {
16     plan tests => 5;
17 }
18
19 {
20     ok( my $response = request('http://localhost/'), 'Request' );
21     ok( $response->is_success, 'Response Successful 2xx' );
22 }
23 {
24     ok( my $response = request('http://localhost/'), 'Request' );
25     ok( $response->is_success, 'Response Successful 2xx' );
26     ok( $response->content =~ m/\/default.*?[\d.]+s.*- test.*[\d.]+s/s, 'Stats report');
27
28 }
29