Cleanup, exception handling, fresh assets in GalleryAlbum/delete.t

This commit is contained in:
Colin Kuskie 2010-05-21 13:58:49 -07:00
parent 9059cf5f3f
commit bfbe11ae32

View file

@ -49,6 +49,10 @@ my $album
});
$versionTag->commit;
WebGUI::Test->addToCleanup($versionTag);
foreach my $asset ($gallery, $album) {
$asset = $asset->cloneFromDb;
}
#----------------------------------------------------------------------------
# Tests
@ -95,15 +99,6 @@ $maker->prepare({
});
$maker->run;
is(
WebGUI::Asset->newById( $session, $assetId ),
undef,
"GalleryAlbum cannot be instanciated after www_deleteConfirm",
);
eval { WebGUI::Asset->newById( $session, $assetId ); };
ok (Exception::Class->caught(), "GalleryAlbum cannot be instanciated after www_deleteConfirm");
#----------------------------------------------------------------------------
# Cleanup
END {
$versionTag->rollback();
}