Merge branch 'master' into gsoc_breadboard
[catagits/Catalyst-Runtime.git] / t / live_stats.t
CommitLineData
dc5f035e 1#!perl
2
3use strict;
4use warnings;
5
6use FindBin;
7use lib "$FindBin::Bin/lib";
8
b6b1bcad 9use Test::More;
dc5f035e 10use Catalyst::Test 'TestAppStats';
11
b6b1bcad 12if ( $ENV{CATALYST_SERVER} ) {
13 plan skip_all => 'Using remote server';
14}
15else {
16 plan tests => 5;
17}
18
dc5f035e 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' );
f3414019 26 like( $response->content, qr/\/default.*?[\d.]+s.*- test.*[\d.]+s/s, 'Stats report');
dc5f035e 27
28}
29