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;
|
$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();
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue