since _context is a weak ref it can go out of scope before all the errors are finishe...
[catagits/Catalyst-Runtime.git] / t / live_stats.t
CommitLineData
dc5f035e 1use strict;
2use warnings;
3
4use FindBin;
5use lib "$FindBin::Bin/lib";
6
b6b1bcad 7use Test::More;
dc5f035e 8use Catalyst::Test 'TestAppStats';
9
b6b1bcad 10if ( $ENV{CATALYST_SERVER} ) {
11 plan skip_all => 'Using remote server';
12}
13else {
14 plan tests => 5;
15}
16
dc5f035e 17{
18 ok( my $response = request('http://localhost/'), 'Request' );
19 ok( $response->is_success, 'Response Successful 2xx' );
20}
21{
22 ok( my $response = request('http://localhost/'), 'Request' );
23 ok( $response->is_success, 'Response Successful 2xx' );
f3414019 24 like( $response->content, qr/\/default.*?[\d.]+s.*- test.*[\d.]+s/s, 'Stats report');
dc5f035e 25
26}
27