Made Survey tests a little less dependent on multiple choice bundle defaults

This commit is contained in:
Patrick Donelan 2009-06-16 06:25:09 +00:00
parent 4758e10a20
commit 3e5d5804f6
2 changed files with 5 additions and 6 deletions

View file

@ -1393,7 +1393,6 @@ my $answerBundle = $surveyJSON->getMultiChoiceBundle('Yes/No');
$surveyJSON->addAnswersToQuestion( [3,0], $surveyJSON->addAnswersToQuestion( [3,0],
$answerBundle, $answerBundle,
); );
cmp_deeply( cmp_deeply(
$surveyJSON->question([3,0]), $surveyJSON->question([3,0]),
superhashof({ superhashof({
@ -1401,14 +1400,14 @@ cmp_deeply(
superhashof({ superhashof({
text => 'Yes', text => 'Yes',
verbatim => 0, verbatim => 0,
recordedAnswer => 1, recordedAnswer => $answerBundle->[0]{recordedAnswer},
value => 1, value => $answerBundle->[0]{value},
}), }),
superhashof({ superhashof({
text => 'No', text => 'No',
verbatim => 0, verbatim => 0,
recordedAnswer => 0, recordedAnswer => $answerBundle->[1]{recordedAnswer},
value => 1, value => $answerBundle->[1]{value},
}), }),
], ],
}), }),

View file

@ -631,7 +631,7 @@ $spec = <<END_SPEC;
[ [
{ {
"sequence" : { "sequence" : {
"S0Q0" : { "recordedAnswer" : "desc", "score" : "cons" }, # This is a default Yes/No (score all 1) "S0Q0" : { "recordedAnswer" : "desc"}, # This is a default Yes/No (score all 1)
"S4Q0" : { "recordedAnswer" : "asc" }, # Certainty scale, with recordedAnswer 0 .. 11 "S4Q0" : { "recordedAnswer" : "asc" }, # Certainty scale, with recordedAnswer 0 .. 11
"S3Q0" : { "recordedAnswer" : "desc", "score" : "desc" }, # These 3 are yes/no questions where we have "S3Q0" : { "recordedAnswer" : "desc", "score" : "desc" }, # These 3 are yes/no questions where we have
"S3Q1" : { "recordedAnswer" : "desc", "score" : "desc" }, # ..set the score on the No answer to zero, hence "S3Q1" : { "recordedAnswer" : "desc", "score" : "desc" }, # ..set the score on the No answer to zero, hence