Testing assets have to be based off the root node, so the lineage works right. Change this, and clean them all up.

This commit is contained in:
Colin Kuskie 2011-01-04 11:46:37 -08:00
parent fe181907e5
commit a8fcce617a

View file

@ -33,7 +33,7 @@ $versionTag->set({name=>"Adding assets for RootTitle tests"});
my %tag = ( tagId => $versionTag->getId, status => "pending" );
addToCleanup($versionTag);
my $root = WebGUI::Test->asset;
my $root = WebGUI::Asset->getRoot($session);
my %properties_A = (
className => 'WebGUI::Asset::Snippet',
title => 'Asset A',
@ -118,6 +118,8 @@ my $asset_ = $root->addChild(\%properties__, $properties__{id});
$versionTag->commit;
WebGUI::Test->addToCleanup($assetZ, $asset_);
my $origLineage = $asset_->lineage;
my $newLineage = substr $origLineage, 0, length($origLineage)-1;
$session->db->write('update asset set lineage=? where assetId=?',[$newLineage, $asset_->getId]);