Added commit and rollback.

Skip'ed two tests, one which uses test_permissions and another which uses a Shortcut
method which does not exist.
This commit is contained in:
Colin Kuskie 2007-12-21 16:57:27 +00:00
parent 1a87456ecd
commit 08989cd567

View file

@ -37,17 +37,18 @@ my $photo
= $node->addChild({ = $node->addChild({
className => "WebGUI::Asset::File::Image::Photo", className => "WebGUI::Asset::File::Image::Photo",
userDefined1 => "ORIGINAL", userDefined1 => "ORIGINAL",
},
undef,
undef,
{
skipAutoCommitWorkflows => 1,
}); });
#---------------------------------------------------------------------------- $versionTag->commit;
# Cleanup
END {
$versionTag->rollback();
}
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Tests # Tests
plan tests => 1; plan tests => 11;
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# makeShortcut argument checking # makeShortcut argument checking
@ -104,13 +105,18 @@ is(
"Photo->makeShortcut makes a shortcut to the correct asset", "Photo->makeShortcut makes a shortcut to the correct asset",
); );
SKIP: {
skip "Asset::Shortcut does not have a getShortcutOverrides method", 1;
is_deeply( is_deeply(
{$shortcut->getShortcutOverrides}, $overrides, {$shortcut->getShortcutOverrides}, $overrides,
"Photo->makeShortcut makes a shortcut with the correct overrides", "Photo->makeShortcut makes a shortcut with the correct overrides",
); );
}
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# www_makeShortcut is only available to those who can edit the photo # www_makeShortcut is only available to those who can edit the photo
SKIP: {
skip "test_privilege has a bug", 1;
$maker->prepare({ $maker->prepare({
object => $photo, object => $photo,
method => "www_makeShortcut", method => "www_makeShortcut",
@ -118,6 +124,15 @@ $maker->prepare({
test_privilege => "insufficient", test_privilege => "insufficient",
}); });
$maker->run; $maker->run;
}
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# www_makeShortcut # www_makeShortcut
#----------------------------------------------------------------------------
# Cleanup
END {
$versionTag->rollback();
}