Cleanup version tags.

This commit is contained in:
Colin Kuskie 2009-09-25 19:25:14 -07:00
parent 5876dec8de
commit 50650c052f

View file

@ -29,6 +29,7 @@ my $node = WebGUI::Asset->getImportNode($session);
my $versionTag = WebGUI::VersionTag->getWorking($session);
$versionTag->set({name=>"Matrix Test"});
WebGUI::Test->tagsToRollback($versionTag);
my $matrix = $node->addChild({className=>'WebGUI::Asset::Wobject::Matrix'});
# Test for a sane object type
@ -107,6 +108,7 @@ my $matrixListing = $matrix->addChild({className=>'WebGUI::Asset::MatrixListing'
my $secondVersionTag = WebGUI::VersionTag->new($session,$matrixListing->get("tagId"));
$secondVersionTag->commit;
WebGUI::Test->tagsToRollback($secondVersionTag);
# Test for sane object type
isa_ok($matrixListing, 'WebGUI::Asset::MatrixListing');
@ -175,6 +177,7 @@ cmp_deeply(
$session->user({userId => 3});
my $json = $matrix->www_getCompareFormData('score');
diag $session->getId;
my $compareFormData = JSON->new->decode($json);
@ -290,10 +293,3 @@ cmp_deeply(
},
'Statistics were cached by view method.'
);
END {
# Clean up after thy self
$versionTag->rollback();
$secondVersionTag->rollback();
}