Cleanup, exception handling, fresh assets in GalleryAlbum/delete.t
This commit is contained in:
parent
9059cf5f3f
commit
bfbe11ae32
1 changed files with 6 additions and 11 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue