]> git.decadent.org.uk Git - maypole.git/blobdiff - t/1.t
Maypole::CLI and the beginnings of a test suite.
[maypole.git] / t / 1.t
diff --git a/t/1.t b/t/1.t
index fe7939c61ea11109f4702b8823a3420c4837dae5..77c1f9fdef874ff5a28d60a76fc46e2acdebd91b 100644 (file)
--- a/t/1.t
+++ b/t/1.t
@@ -1,3 +1,14 @@
 # vim:ft=perl
-use Test::More 'no_plan';
-use_ok('Apache::MVC');
+use Test::More tests => 5;
+use Maypole::CLI qw(BeerDB);
+$ENV{MAYPOLE_TEMPLATES} = "t/templates";
+
+isa_ok( (bless {},"BeerDB") , "Maypole");
+
+@ARGV = ("http://localhost/beerdb/");
+is(BeerDB->handler, 200, "OK");
+like($Maypole::CLI::buffer, qr/frontpage/, "Got the front page");
+
+@ARGV = ("http://localhost/beerdb/beer/list");
+is(BeerDB->handler, 200, "OK");
+like($Maypole::CLI::buffer, qr/Organic Best/, "Found a beer in the list");