Better cleanup for a Shortcut test.
This commit is contained in:
parent
0f7facdf8e
commit
b2b03b662c
1 changed files with 2 additions and 7 deletions
|
|
@ -28,6 +28,7 @@ my $session = WebGUI::Test->session;
|
||||||
my $node = WebGUI::Asset->getImportNode($session);
|
my $node = WebGUI::Asset->getImportNode($session);
|
||||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||||
$versionTag->set({name=>"Shortcut Test"});
|
$versionTag->set({name=>"Shortcut Test"});
|
||||||
|
addToCleanup;
|
||||||
|
|
||||||
# Make a snippet to shortcut
|
# Make a snippet to shortcut
|
||||||
my $snippet
|
my $snippet
|
||||||
|
|
@ -41,12 +42,6 @@ my $shortcut
|
||||||
shortcutToAssetId => $snippet->getId,
|
shortcutToAssetId => $snippet->getId,
|
||||||
});
|
});
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
|
||||||
# Cleanup
|
|
||||||
END {
|
|
||||||
$versionTag->rollback();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Tests
|
# Tests
|
||||||
|
|
@ -74,7 +69,7 @@ is(
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Test trashing snippet trashes shortcut also
|
# Test trashing snippet trashes shortcut also
|
||||||
$snippet->trash;
|
$snippet->trash;
|
||||||
$shortcut = WebGUI::Asset->newByDynamicClass($session, $shortcut->getId);
|
$shortcut = WebGUI::Asset->newById($session, $shortcut->getId);
|
||||||
|
|
||||||
ok(
|
ok(
|
||||||
defined $shortcut,
|
defined $shortcut,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue