Modify tests to use the automatic storage cleanup provided by WebGUI::Test.

Several tests previously leaked storage locations.
This commit is contained in:
Colin Kuskie 2009-04-14 01:54:28 +00:00
parent decde00451
commit 1a9da53abf
11 changed files with 18 additions and 11 deletions

View file

@ -49,6 +49,7 @@ my $ad;
my ($richAd, $textAd, $imageAd, $nonAd, $setAd);
my $adSpace;
my $imageStorage = WebGUI::Storage->create($session);
WebGUI::Test->storagesToDelete($imageStorage);
$imageStorage->addFileFromScalar('foo.bmp', 'This is not really an image');
SKIP: {
@ -219,7 +220,4 @@ END {
if (defined $adSpace and ref $adSpace eq 'WebGUI::AdSpace') {
$adSpace->delete;
}
if (defined $imageStorage and ref $imageStorage eq 'WebGUI::Storage') {
$imageStorage->delete;
}
}