fix a failing Shop::Ship test

This commit is contained in:
Colin Kuskie 2008-03-06 17:44:34 +00:00
parent 8a04f5911f
commit 2fc985fe54
2 changed files with 4 additions and 4 deletions

View file

@ -92,9 +92,9 @@ sub getDrivers {
Returns a list of options for the user to ship, along with the cost of using each one. It is a hash of hashrefs,
with the key of the primary hash being the shipperId of the driver, and sub keys of label and price.
=head3 $session
=head3 $cart
A WebGUI::Session object. A WebGUI::Error::InvalidParam exception will be thrown if it doesn't get one.
A WebGUI::Shop::Cart object. A WebGUI::Error::InvalidParam exception will be thrown if it doesn't get one.
=head3
@ -102,8 +102,8 @@ A WebGUI::Session object. A WebGUI::Error::InvalidParam exception will be throw
sub getOptions {
my ($class, $cart) = @_;
WebGUI::Error::InvalidParam->throw(error => q{Need a cart.}) unless defined $cart and $cart->isa("WebGUI::Shop::Cart");
my $session = $cart->session;
WebGUI::Error::InvalidParam->throw(error => q{Need a cart.}) unless $cart->isa("WebGUI::Shop::Cart");
my %options = ();
foreach my $shipper (@{$class->getShippers($session)}) {
$options{$shipper->getId} = {

View file

@ -232,7 +232,7 @@ isa_ok($e, 'WebGUI::Error::InvalidParam', 'getOptions takes exception to not giv
cmp_deeply(
$e,
methods(
error => 'Must provide a session variable',
error => 'Need a cart.',
),
'getOptions takes exception to not giving it a session object',
);