summary refs log tree commit diff
path: root/t/02-app.t
diff options
context:
space:
mode:
Diffstat (limited to 't/02-app.t')
-rw-r--r--t/02-app.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/02-app.t b/t/02-app.t
new file mode 100644
index 0000000..73e738c
--- /dev/null
+++ b/t/02-app.t
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use Test::More import => ["!pass"];
+
+use Dancer ':syntax';
+use Dancer::Test;
+
+plan tests => 3;
+
+setting template => 'xslate';
+setting views   => 't';
+
+ok(
+    get '/' => sub {
+        template 'index', { loop => [1..2] };
+    }
+);
+
+route_exists [ GET => '/' ];
+response_content_like( [ GET => '/' ], qr/1<br \/>\n2/ );