Import node can't be used to test getBackToSiteURL since that forces the user back to the default asset.

This commit is contained in:
Colin Kuskie 2011-01-04 10:56:48 -08:00
parent 78a12c18e9
commit 25b981baec

View file

@ -398,11 +398,14 @@ TODO: {
ok(0, 'test a child of the media folder');
}
my $parentAsset = WebGUI::Test->asset;
my $versionTag = WebGUI::VersionTag->getWorking($session);
WebGUI::Test->addToCleanup($versionTag);
my $parentAsset = WebGUI::Asset->getRoot($session);
my $statefulAsset = $parentAsset->addChild({ className => 'WebGUI::Asset::Snippet' });
$session->asset( $statefulAsset );
$versionTag->commit;
$statefulAsset = $statefulAsset->cloneFromDb;
$session->asset($statefulAsset);
$statefulAsset->state('published');
is(
$session->url->getBackToSiteURL,
$parentAsset->getUrl,