Update Tax.pm for Moose.
This commit is contained in:
parent
9d4d303bc3
commit
a7cc3696c6
2 changed files with 26 additions and 32 deletions
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue