X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=t%2F01basics.t;h=e40fa85f488725b000c26b80428cc70012c51779;hb=ea4ae8a93a09e21354465c485471e5f10582b784;hp=2b1518dead6a4b6a2d34c9c766d65d83b14bd5d4;hpb=8617321ebf13ce6b63d41a65a003d153f2b5cc5e;p=maypole.git diff --git a/t/01basics.t b/t/01basics.t index 2b1518d..e40fa85 100644 --- a/t/01basics.t +++ b/t/01basics.t @@ -1,4 +1,4 @@ -# vim:ft=perl +#!/usr/bin/perl -w use Test::More; use lib 'ex'; # Where BeerDB should live BEGIN { @@ -7,7 +7,7 @@ BEGIN { "SQLite not working or BeerDB module could not be loaded: $@" ) if $@; - plan tests => 15; + plan tests => 18; } use Maypole::CLI qw(BeerDB); use Maypole::Constants; @@ -15,8 +15,6 @@ $ENV{MAYPOLE_TEMPLATES} = "t/templates"; isa_ok( (bless {},"BeerDB") , "Maypole"); -BeerDB->config->view_options({COMPILE_DIR => '/home/simon/dev/maypole/compiled'}); - # Test the effect of trailing slash on config->uri_base and request URI (my $uri_base = BeerDB->config->uri_base) =~ s:/$::; BeerDB->config->uri_base($uri_base); @@ -44,3 +42,7 @@ is($classdata{list_columns}, 'score name price style brewery url', 'classdata.list_columns'); is ($classdata{related_accessors},'pubs','classdata.related_accessors'); +# test if successfully loaded customised model class +can_ok(BeerDB::Beer => 'fooey'); # defined in BeerDB::Beer +can_ok(BeerDB::Beer => 'floob'); # defined in BeerDB::Base +is_deeply( [@BeerDB::Beer::ISA], [qw/Maypole::Model::CDBI Class::DBI::SQLite BeerDB::Base/] );