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