X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=t%2F1.t;h=be5e6bdac57f11a880cbf59019bab09e66887d00;hb=0f0ccfbbe2488b34841e5af2ecedd9f256c8489f;hp=fe7939c61ea11109f4702b8823a3420c4837dae5;hpb=4c4e58eb02155a43397f30b900c5b30f755cb874;p=maypole.git diff --git a/t/1.t b/t/1.t index fe7939c..be5e6bd 100644 --- a/t/1.t +++ b/t/1.t @@ -1,3 +1,15 @@ # vim:ft=perl -use Test::More 'no_plan'; -use_ok('Apache::MVC'); +use Test::More tests => 5; +use Maypole::CLI qw(BeerDB); +use Maypole::Constants; +$ENV{MAYPOLE_TEMPLATES} = "t/templates"; + +isa_ok( (bless {},"BeerDB") , "Maypole"); + +@ARGV = ("http://localhost/beerdb/"); +is(BeerDB->handler, OK, "OK"); +like($Maypole::CLI::buffer, qr/frontpage/, "Got the front page"); + +@ARGV = ("http://localhost/beerdb/beer/list"); +is(BeerDB->handler, OK, "OK"); +like($Maypole::CLI::buffer, qr/Organic Best/, "Found a beer in the list");