fix clean-up of Products in FlatRate test

This commit is contained in:
Colin Kuskie 2008-10-08 20:26:50 +00:00
parent 9d45d764b3
commit 58d97badcd

View file

@ -249,7 +249,7 @@ undef $driver;
#
#######################################################################
my $car = WebGUI::Asset->getImportNode($session)->addChild({
$car = WebGUI::Asset->getImportNode($session)->addChild({
className => 'WebGUI::Asset::Sku::Product',
title => 'Automobiles',
isShippingRequired => 1,
@ -312,7 +312,7 @@ END {
if (defined $cart and ref $cart eq 'WebGUI::Shop::Cart') {
$cart->delete;
}
if (defined $car and ref $car eq 'WebGUI::Asset:Sku::Product') {
if (defined $car and (ref($car) eq 'WebGUI::Asset::Sku::Product')) {
$car->purge;
}
}