Set the user to be Admin, make sure we're working with committed assets, and do the standard fix for addToCleanup to work with the debugger.
This commit is contained in:
parent
74b4049e3b
commit
c9c62eff84
1 changed files with 5 additions and 2 deletions
|
|
@ -247,7 +247,7 @@ isnt(
|
|||
my $cart = $driver->getCart;
|
||||
WebGUI::Test->addToCleanup($cart);
|
||||
isa_ok ($cart, 'WebGUI::Shop::Cart', 'getCart returns an instantiated WebGUI::Shop::Cart object');
|
||||
addToCleanup($cart);
|
||||
WebGUI::Test->addToCleanup($cart);
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
|
|
@ -474,6 +474,9 @@ my $blue_widget = $widget->setCollateral('variantsJSON', 'variantId', 'new',
|
|||
);
|
||||
|
||||
$versionTag->commit;
|
||||
$widget = $widget->cloneFromDb;
|
||||
|
||||
$session->user({userId => 3});
|
||||
my $cart = WebGUI::Shop::Cart->newBySession($session);
|
||||
WebGUI::Test->addToCleanup($versionTag, $cart);
|
||||
my $addressBook = $cart->getAddressBook;
|
||||
|
|
@ -488,11 +491,11 @@ $cart->update({
|
|||
billingAddressId => $workAddress->getId,
|
||||
shippingAddressId => $workAddress->getId,
|
||||
});
|
||||
|
||||
$widget->addToCart($widget->getCollateral('variantsJSON', 'variantId', $blue_widget));
|
||||
|
||||
my $cart_variables = {};
|
||||
$driver->appendCartVariables($cart_variables);
|
||||
diag Dumper($cart_variables);
|
||||
|
||||
cmp_deeply(
|
||||
$cart_variables,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue