Skip to content
Permalink
Browse files

Cleanup more tests that are leaking carts due to address book useId i…

…ssues.
  • Loading branch information...
perlDreamer committed May 2, 2010
1 parent c6b3438 commit dbca5b31d9d8dd01e817a09798c75850773cb931
Showing with 5 additions and 17 deletions.
  1. +1 −12 t/Shop/PayDriver/Ogone.t
  2. +4 −5 t/Workflow/Activity/RemoveOldCarts.t
@@ -361,6 +361,7 @@ isnt(

my $cart = $driver->getCart;
isa_ok ($cart, 'WebGUI::Shop::Cart', 'getCart returns an instantiated WebGUI::Shop::Cart object');
WebGUI::Test->addToCleanup($cart);

#######################################################################
#
@@ -587,16 +588,4 @@ is ($count, 0, 'delete deleted the object');

undef $driver;




#----------------------------------------------------------------------------
# Cleanup



}
END {

}
#vim:ft=perl
@@ -24,6 +24,7 @@ use Test::Deep;
plan tests => 6; # increment this value for each test you create

my $session = WebGUI::Test->session;
$session->user({userId => 3});

my $root = WebGUI::Asset->getRoot($session);
my $donation = $root->addChild({
@@ -38,6 +39,7 @@ WebGUI::Test->tagsToRollback($tag);
my $cart1 = WebGUI::Shop::Cart->create($session);

my $session2 = WebGUI::Session->open(WebGUI::Test->root, WebGUI::Test->file);
$session2->user({userId => 3});
WebGUI::Test->sessionsToDelete($session2);
my $cart2 = WebGUI::Shop::Cart->create($session2);
$cart2->update({creationDate => time()-10000});
@@ -81,14 +83,15 @@ my $instance1 = WebGUI::Workflow::Instance->create($session,
skipSpectreNotification => 1,
}
);
WebGUI::Test->addToCleanup($instance1);

my $retVal;

$retVal = $instance1->run();
is($retVal, 'complete', 'cleanup: activity complete');
$retVal = $instance1->run();
is($retVal, 'done', 'cleanup: activity is done');
$instance1->delete;
$instance1->delete('skipNotify');

@cartIds = $session->db->buildArray('select cartId from cart');
cmp_bag(
@@ -103,7 +106,3 @@ cmp_bag(
[ $item1->getId, ],
'Deleted 1 item, the correct one'
);

END {
$instance1->delete('skipNotify');
}

0 comments on commit dbca5b3

Please sign in to comment.
You can’t perform that action at this time.