fixed bugs due to changes in code
This commit is contained in:
parent
7f4ebb2c47
commit
3d8b329660
2 changed files with 4 additions and 4 deletions
|
|
@ -68,7 +68,7 @@ $cart->update({shippingAddressId => "XXXX"});
|
||||||
is($cart->get("shippingAddressId"), "XXXX", "Can set values to the cart properties.");
|
is($cart->get("shippingAddressId"), "XXXX", "Can set values to the cart properties.");
|
||||||
|
|
||||||
$cart->empty;
|
$cart->empty;
|
||||||
is($session->db->quickScalar("select count(*) from cartItems where cartId=?",[$cart->getId]), 0, "Items are removed from cart.");
|
is($session->db->quickScalar("select count(*) from cartItem where cartId=?",[$cart->getId]), 0, "Items are removed from cart.");
|
||||||
|
|
||||||
$cart->delete;
|
$cart->delete;
|
||||||
is($cart->delete, undef, "Can destroy cart.");
|
is($cart->delete, undef, "Can destroy cart.");
|
||||||
|
|
|
||||||
|
|
@ -83,9 +83,9 @@ is($session->getId, $ship->session->getId, 'session method returns OUR session o
|
||||||
my $drivers;
|
my $drivers;
|
||||||
|
|
||||||
$drivers = $ship->getDrivers();
|
$drivers = $ship->getDrivers();
|
||||||
|
my @driverClasses = keys %{$drivers};
|
||||||
cmp_deeply(
|
cmp_deeply(
|
||||||
$drivers,
|
\@driverClasses,
|
||||||
[ 'WebGUI::Shop::ShipDriver::FlatRate' ],
|
[ 'WebGUI::Shop::ShipDriver::FlatRate' ],
|
||||||
'getDrivers: WebGUI only ships with 1 default shipping driver',
|
'getDrivers: WebGUI only ships with 1 default shipping driver',
|
||||||
);
|
);
|
||||||
|
|
@ -158,7 +158,7 @@ my $driver2 = $ship->addShipper('WebGUI::Shop::ShipDriver::FlatRate', { enabled=
|
||||||
$shippers = $ship->getShippers();
|
$shippers = $ship->getShippers();
|
||||||
is(scalar @{$shippers}, 2, 'getShippers: got both shippers');
|
is(scalar @{$shippers}, 2, 'getShippers: got both shippers');
|
||||||
|
|
||||||
my @shipperNames = map { $_->options()->{label} } @{ $shippers };
|
my @shipperNames = map { $_->get("label") } @{ $shippers };
|
||||||
cmp_bag(
|
cmp_bag(
|
||||||
\@shipperNames,
|
\@shipperNames,
|
||||||
[q{Jake's Jailbird Airmail},q{Tommy's cut-rate shipping}],
|
[q{Jake's Jailbird Airmail},q{Tommy's cut-rate shipping}],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue