summary refs log tree commit diff
path: root/t
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-08-23 20:25:28 +0200
committerfranck cuny <franck@lumberjaph.net>2010-08-23 20:25:28 +0200
commit7b12e17aeb45e8fa1a85861220bbed441eff3bbb (patch)
tree99dd551379c53b8204827d1634bc697e58cae928 /t
downloaddancer-chat-master.tar.gz
initial commit master
Diffstat (limited to 't')
-rw-r--r--t/001_base.t5
-rw-r--r--t/002_index_route.t12
2 files changed, 17 insertions, 0 deletions
diff --git a/t/001_base.t b/t/001_base.t
new file mode 100644
index 0000000..12943a6
--- /dev/null
+++ b/t/001_base.t
@@ -0,0 +1,5 @@
+use Test::More tests => 1;
+use strict;
+use warnings;
+
+use_ok 'chat';
diff --git a/t/002_index_route.t b/t/002_index_route.t
new file mode 100644
index 0000000..0f98f81
--- /dev/null
+++ b/t/002_index_route.t
@@ -0,0 +1,12 @@
+use Test::More tests => 3;
+use strict;
+use warnings;
+
+# the order is important
+use chat;
+use Dancer::Test;
+
+route_exists [GET => '/'], 'a route handler is defined for /';
+response_status_is ['GET' => '/'], 200, 'response status is 200 for /';
+response_content_like [GET => '/'], qr/It Works.*I'm in.*index.tt/s,
+    'content looks OK for /';