Skip to content

Commit b1df3ad

Browse files
committedJan 16, 2012
Fix a flaky test.
1 parent 3b3502b commit b1df3ad

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎t/Asset/Wobject/Survey/package.t

+5-3
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,16 @@ $sJSON->update([0,0,1], { text => 'two',});
4040
$sJSON->update([0,0,2], { text => 'more than two',});
4141
$sJSON->update([0,1], { variable => 'name', questionType => 'Text' });
4242

43-
$survey->persistSurveyJSON;
44-
4543
$survey->addType('toes', [0,0]);
4644

45+
$survey->persistSurveyJSON; ##This does not update the SurveyJSON object cacched in the Survey object
46+
$survey=$survey->cloneFromDb;
47+
4748
my $asset_data = $survey->exportAssetData();
4849

4950
ok exists $asset_data->{question_types}, 'question_types entry exists in asset data to package';
50-
ok exists $asset_data->{question_types}->{toes}, 'the toes type in a question type';
51+
ok exists $asset_data->{question_types}->{toes}, 'the toes type in a question type' or
52+
explain $asset_data;
5153
ok !exists $asset_data->{question_types}->{name}, 'name question not in question types';
5254

5355
$asset_data->{question_types}->{fingers} = clone $asset_data->{question_types}->{toes};

0 commit comments

Comments
 (0)
Please sign in to comment.