add Tests for getShippers, and some code for the method too.
This commit is contained in:
parent
df47d0a07c
commit
1261c96349
2 changed files with 43 additions and 12 deletions
|
|
@ -31,7 +31,7 @@ my $session = WebGUI::Test->session;
|
|||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
my $tests = 23;
|
||||
my $tests = 25;
|
||||
plan tests => 1 + $tests;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -188,6 +188,27 @@ is($driverCopy->getId, $driver->getId, 'same id');
|
|||
is($driverCopy->className, $driver->className, 'same className');
|
||||
cmp_deeply($driverCopy->options, $driver->options, 'same options');
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# getShippers
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
my $shippers;
|
||||
|
||||
eval { $shippers = WebGUI::Shop::Ship->getShippers(); };
|
||||
$e = Exception::Class->caught();
|
||||
isa_ok($e, 'WebGUI::Error::InvalidParam', 'getShippers takes exception to not giving it a session object');
|
||||
cmp_deeply(
|
||||
$e,
|
||||
methods(
|
||||
error => 'Must provide a session variable',
|
||||
),
|
||||
'getShippers takes exception to not giving it a session object',
|
||||
);
|
||||
|
||||
$shippers = WebGUI::Shop::Ship->getShippers();
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue