Permalink
Browse files

Adjustments to the testing

1) Remove Data::Dumper
2) Increment the amount of tests
3) Ensure to add the item to the cart before specifiying a hook
   for removing the item.
  • Loading branch information...
1 parent 2bae2c6 commit 0e5de0ca082aad44e3ead893be9042570d676a63 @rmtemplet committed Oct 5, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 t/003_cart.t
View
@@ -5,8 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 21;
-use Data::Dumper;
+use Test::More tests => 22;
use Nitesi::Cart;
@@ -70,6 +69,9 @@ $cart = Nitesi::Cart->new(run_hooks => sub {
$item = {sku => 'DEF', name => 'Foobar', price => 5};
$ret = $cart->add($item);
+$item = {sku => '123', name => 'Foobar', price => 5};
+$ret = $cart->add($item);
+
$ret = $cart->remove('123');
ok($cart->error eq 'Test error', "Cart error: " . $cart->error);

0 comments on commit 0e5de0c

Please sign in to comment.