Skip to content
Permalink
Browse files

No more leaky tests for carts.

  • Loading branch information...
perlDreamer committed Nov 5, 2011
1 parent 8a92be9 commit 3bd5172d6c04f2ce7b2a6ebf93878cf70945fd8b
Showing with 10 additions and 0 deletions.
  1. +1 −0 t/Asset/Sku/EMSRibbon.t
  2. +1 −0 t/Asset/Sku/EMSTicket.t
  3. +1 −0 t/Asset/Sku/EMSToken.t
  4. +7 −0 t/Asset/Sku/Product.t
@@ -50,6 +50,7 @@ $mech->submit_form_ok({
});

my $cart = WebGUI::Shop::Cart->newBySession( $mech->session );
WebGUI::Test->addToCleanup($cart);
ok( $cart->getItemsByAssetId([ $ribbon->getId ])->[0]->getId, $ribbon->getId );


@@ -50,6 +50,7 @@ $mech->submit_form_ok({
});

my $cart = WebGUI::Shop::Cart->newBySession( $mech->session );
WebGUI::Test->addToCleanup($cart);
ok( $cart->getItemsByAssetId([ $ticket->getId ])->[0]->getId, $ticket->getId );


@@ -50,6 +50,7 @@ $mech->submit_form_ok({
});

my $cart = WebGUI::Shop::Cart->newBySession( $mech->session );
WebGUI::Test->addToCleanup($cart);
ok( $cart->getItemsByAssetId([ $token->getId ])->[0]->getId, $token->getId );


@@ -212,6 +212,8 @@ $mech->submit_form_ok({
},
}, 'add viewProduct and go back' );

WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session));

$product = $product->cloneFromDb;
cmp_deeply(
$product->getAllCollateral( 'accessoryJSON' ),
@@ -246,6 +248,7 @@ $mech->submit_form_ok({
proceed => 0,
},
}, 'add viewProduct and go back' );
WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session));

$product = $product->cloneFromDb;
cmp_deeply(
@@ -281,6 +284,7 @@ $mech->submit_form_ok({
proceed => 0,
},
}, 'add one more new benefit' );
WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session));

$product = $product->cloneFromDb;
cmp_deeply(
@@ -338,6 +342,7 @@ $mech->submit_form_ok({
proceed => 0,
},
}, 'add one more new feature' );
WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session));

$product = $product->cloneFromDb;
cmp_deeply(
@@ -401,6 +406,7 @@ $mech->submit_form_ok({
proceed => 0,
},
}, 'add one more new feature' );
WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session));

$product = $product->cloneFromDb;
cmp_deeply(
@@ -475,6 +481,7 @@ $mech->submit_form_ok({
proceed => 0,
},
}, 'add one more new variant' );
WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session));

$product = $product->cloneFromDb;
cmp_deeply(

0 comments on commit 3bd5172

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