Purge tests before cleaning up version tags. Fix a leaky test.

This commit is contained in:
Colin Kuskie 2009-09-04 19:59:26 -07:00
parent 0cbc4eece1
commit 8fd0be0dc4
2 changed files with 6 additions and 4 deletions

View file

@ -35,6 +35,8 @@ WebGUI::Test->usersToDelete($user);
# Create a Survey
my $survey = WebGUI::Asset->getImportNode($session)->addChild( { className => 'WebGUI::Asset::Wobject::Survey', } );
WebGUI::Test->tagsToRollback(WebGUI::VersionTag->getWorking($session));
WebGUI::Test->assetsToPurge($survey);
my $sJSON = $survey->surveyJSON;
$sJSON->newObject([0]); # add a question to 0th section
$sJSON->update([0,0], { questionType => 'Yes/No' });
@ -104,4 +106,4 @@ is($session->db->quickScalar('select count(*) from Survey_response where Survey_
END {
$session->db->write('delete from Survey_response where userId = ?', [$user->userId]) if $user;
}
}