Cleanup tests that were leaking carts.
This commit is contained in:
parent
884e61aaf6
commit
02c4c5cf47
2 changed files with 4 additions and 17 deletions
|
|
@ -22,6 +22,7 @@ use Test::More; # increment this value for each test you create
|
|||
use Test::Deep;
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
$session->user({userId => 3});
|
||||
|
||||
plan tests => 4;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ use HTML::Form;
|
|||
|
||||
use WebGUI::Test; # Must use this before any other WebGUI modules
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Shop::PayDriver;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Init
|
||||
|
|
@ -31,22 +32,13 @@ my $session = WebGUI::Test->session;
|
|||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
my $tests = 54;
|
||||
plan tests => 1 + $tests;
|
||||
plan tests => 54;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# figure out if the test can actually run
|
||||
|
||||
my $e;
|
||||
|
||||
my $loaded = use_ok('WebGUI::Shop::PayDriver');
|
||||
|
||||
my $storage;
|
||||
|
||||
SKIP: {
|
||||
|
||||
skip 'Unable to load module WebGUI::Shop::PayDriver', $tests unless $loaded;
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# definition
|
||||
|
|
@ -255,6 +247,7 @@ isnt(
|
|||
|
||||
my $cart = $driver->getCart;
|
||||
isa_ok ($cart, 'WebGUI::Shop::Cart', 'getCart returns an instantiated WebGUI::Shop::Cart object');
|
||||
addToCleanup($cart);
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
|
|
@ -475,10 +468,3 @@ is ($count, 0, 'delete deleted the object');
|
|||
|
||||
undef $driver;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Cleanup
|
||||
END {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue