]> git.ktnx.net Git - lsl.git/blobdiff - t/002_index_route.t
first take at a Dancer2 app, some functions work
[lsl.git] / t / 002_index_route.t
diff --git a/t/002_index_route.t b/t/002_index_route.t
new file mode 100644 (file)
index 0000000..8262d7f
--- /dev/null
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+
+use App::REST::LazyShoppingList;
+use Test::More tests => 2;
+use Plack::Test;
+use HTTP::Request::Common;
+use Ref::Util qw<is_coderef>;
+
+my $app = App::REST::LazyShoppingList->to_app;
+ok( is_coderef($app), 'Got app' );
+
+my $test = Plack::Test->create($app);
+my $res  = $test->request( GET '/' );
+
+ok( $res->is_success, '[GET /] successful' );