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