From 3d8b329660140da62740c6c9decabe7e9b81d8fb Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 17 Mar 2008 18:46:52 +0000 Subject: [PATCH] fixed bugs due to changes in code --- t/Shop/Cart.t | 2 +- t/Shop/Ship.t | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/t/Shop/Cart.t b/t/Shop/Cart.t index 46289498a..3ab8882e2 100644 --- a/t/Shop/Cart.t +++ b/t/Shop/Cart.t @@ -68,7 +68,7 @@ $cart->update({shippingAddressId => "XXXX"}); is($cart->get("shippingAddressId"), "XXXX", "Can set values to the cart properties."); $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; is($cart->delete, undef, "Can destroy cart."); diff --git a/t/Shop/Ship.t b/t/Shop/Ship.t index 26404e2dc..51a50cf77 100644 --- a/t/Shop/Ship.t +++ b/t/Shop/Ship.t @@ -83,9 +83,9 @@ is($session->getId, $ship->session->getId, 'session method returns OUR session o my $drivers; $drivers = $ship->getDrivers(); - +my @driverClasses = keys %{$drivers}; cmp_deeply( - $drivers, + \@driverClasses, [ 'WebGUI::Shop::ShipDriver::FlatRate' ], '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(); is(scalar @{$shippers}, 2, 'getShippers: got both shippers'); -my @shipperNames = map { $_->options()->{label} } @{ $shippers }; +my @shipperNames = map { $_->get("label") } @{ $shippers }; cmp_bag( \@shipperNames, [q{Jake's Jailbird Airmail},q{Tommy's cut-rate shipping}],