merge the stats patch against .10 into trunk
[catagits/Catalyst-Runtime.git] / t / live_stats.t
diff --git a/t/live_stats.t b/t/live_stats.t
new file mode 100644 (file)
index 0000000..ff7fca8
--- /dev/null
@@ -0,0 +1,22 @@
+#!perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::More tests => 5;
+use Catalyst::Test 'TestAppStats';
+
+{
+    ok( my $response = request('http://localhost/'), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+}
+{
+    ok( my $response = request('http://localhost/'), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    ok( $response->content =~ m/\/default.*?[\d.]+s.*- test.*[\d.]+s/s, 'Stats report');
+
+}
+