Better cart cleanup, so it also removes the CartItems.
This commit is contained in:
parent
6dafc0b99b
commit
53e3f5b2a7
1 changed files with 4 additions and 1 deletions
|
|
@ -41,6 +41,8 @@ my $sku = WebGUI::Asset->getRoot($session)->addChild( {
|
||||||
defaultPrice => 100.00,
|
defaultPrice => 100.00,
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
my $cart;
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Tests
|
# Tests
|
||||||
|
|
||||||
|
|
@ -330,7 +332,7 @@ SKIP: {
|
||||||
), 'appendCartItemVars returns correct error for missing CartItem' );
|
), 'appendCartItemVars returns correct error for missing CartItem' );
|
||||||
|
|
||||||
|
|
||||||
my $cart = WebGUI::Shop::Cart->newBySession( $session );
|
$cart = WebGUI::Shop::Cart->newBySession( $session );
|
||||||
|
|
||||||
my $item = $cart->addItem( $sku );
|
my $item = $cart->addItem( $sku );
|
||||||
$item->setQuantity( 2 );
|
$item->setQuantity( 2 );
|
||||||
|
|
@ -436,6 +438,7 @@ SKIP: {
|
||||||
# Cleanup
|
# Cleanup
|
||||||
END {
|
END {
|
||||||
$session->db->write('delete from tax_eu_vatNumbers');
|
$session->db->write('delete from tax_eu_vatNumbers');
|
||||||
|
$cart->delete;
|
||||||
$session->db->write('delete from cart');
|
$session->db->write('delete from cart');
|
||||||
$session->db->write('delete from addressBook');
|
$session->db->write('delete from addressBook');
|
||||||
$session->db->write('delete from address');
|
$session->db->write('delete from address');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue