Test clean-up for users and groups in Shop/Vendor and all Macro tests.

This commit is contained in:
Colin Kuskie 2009-04-30 23:57:39 +00:00
parent 9973e203ab
commit d7f2aca1e4
4 changed files with 6 additions and 12 deletions

View file

@ -51,6 +51,7 @@ plan tests => $numTests;
@testSets = setupTest($session, @testSets);
my @users = map { $_->{user} } @testSets;
WebGUI::Test->usersToDelete(@users);
foreach my $testSet (@testSets) {
$session->user({ userId => $testSet->{user}->userId });
@ -80,7 +81,4 @@ sub setupTest {
}
END { ##Clean-up after yourself, always
foreach my $dude (@users) {
$dude->delete if (defined $dude and ref $dude eq 'WebGUI::User');
}
}