Fix a flaky test.
This commit is contained in:
parent
3b3502b565
commit
b1df3ad3fc
1 changed files with 5 additions and 3 deletions
|
|
@ -40,14 +40,16 @@ $sJSON->update([0,0,1], { text => 'two',});
|
||||||
$sJSON->update([0,0,2], { text => 'more than two',});
|
$sJSON->update([0,0,2], { text => 'more than two',});
|
||||||
$sJSON->update([0,1], { variable => 'name', questionType => 'Text' });
|
$sJSON->update([0,1], { variable => 'name', questionType => 'Text' });
|
||||||
|
|
||||||
$survey->persistSurveyJSON;
|
|
||||||
|
|
||||||
$survey->addType('toes', [0,0]);
|
$survey->addType('toes', [0,0]);
|
||||||
|
|
||||||
|
$survey->persistSurveyJSON; ##This does not update the SurveyJSON object cacched in the Survey object
|
||||||
|
$survey=$survey->cloneFromDb;
|
||||||
|
|
||||||
my $asset_data = $survey->exportAssetData();
|
my $asset_data = $survey->exportAssetData();
|
||||||
|
|
||||||
ok exists $asset_data->{question_types}, 'question_types entry exists in asset data to package';
|
ok exists $asset_data->{question_types}, 'question_types entry exists in asset data to package';
|
||||||
ok exists $asset_data->{question_types}->{toes}, 'the toes type in a question type';
|
ok exists $asset_data->{question_types}->{toes}, 'the toes type in a question type' or
|
||||||
|
explain $asset_data;
|
||||||
ok !exists $asset_data->{question_types}->{name}, 'name question not in question types';
|
ok !exists $asset_data->{question_types}->{name}, 'name question not in question types';
|
||||||
|
|
||||||
$asset_data->{question_types}->{fingers} = clone $asset_data->{question_types}->{toes};
|
$asset_data->{question_types}->{fingers} = clone $asset_data->{question_types}->{toes};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue