Update Tax.pm for Moose.

This commit is contained in:
Colin Kuskie 2010-07-16 09:01:58 -07:00
parent 9d4d303bc3
commit a7cc3696c6
2 changed files with 26 additions and 32 deletions

View file

@ -17,6 +17,7 @@ use FindBin;
use strict;
use lib "$FindBin::Bin/../lib";
use Test::More;
use Test::Exception;
use WebGUI::Test; # Must use this before any other WebGUI modules
use WebGUI::Session;
@ -28,7 +29,7 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
my $tests = 10;
my $tests = 9;
plan tests => $tests + 1; # Add initial use_ok test
@ -45,11 +46,7 @@ SKIP: {
#
#######################################################################
eval { my $tax = WebGUI::Shop::Tax->new( ) };
my $e = Exception::Class->caught();
isa_ok( $e, 'WebGUI::Error::InvalidParam', 'new: throws error when no session object is passed' );
is( $e->error, 'Need a session.', 'add: correct message for ommitted session object' );
dies_ok { my $tax = WebGUI::Shop::Tax->new( ) } 'new: throws error when no session object is passed';
my $tax = WebGUI::Shop::Tax->new( $session );