]> git.decadent.org.uk Git - maypole.git/blob - t/1.t
Maypole::CLI and the beginnings of a test suite.
[maypole.git] / t / 1.t
1 # vim:ft=perl
2 use Test::More tests => 5;
3 use Maypole::CLI qw(BeerDB);
4 $ENV{MAYPOLE_TEMPLATES} = "t/templates";
5
6 isa_ok( (bless {},"BeerDB") , "Maypole");
7
8 @ARGV = ("http://localhost/beerdb/");
9 is(BeerDB->handler, 200, "OK");
10 like($Maypole::CLI::buffer, qr/frontpage/, "Got the front page");
11
12 @ARGV = ("http://localhost/beerdb/beer/list");
13 is(BeerDB->handler, 200, "OK");
14 like($Maypole::CLI::buffer, qr/Organic Best/, "Found a beer in the list");