Added another Survey ResponseJSON test

This commit is contained in:
Patrick Donelan 2009-04-24 03:43:40 +00:00
parent 90f4abfac1
commit 5e9db959ad

View file

@ -22,7 +22,7 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
my $tests = 81;
my $tests = 82;
plan tests => $tests + 1;
#----------------------------------------------------------------------------
@ -412,6 +412,10 @@ $rJSON->lastResponse(3); # pretend we just finished s1q0
$rJSON->processGotoExpression('jump { value(s0q0) == 3} NEXT_SECTION');
is($rJSON->nextResponse, 5, '..try that again from a different starting point');
$rJSON->lastResponse(8); # pretend we just finished s3q2
$rJSON->processGotoExpression('jump { value(s0q0) == 3} NEXT_SECTION');
is($rJSON->nextResponse, 9, '..NEXT_SECTION on the last section is ok, it just ends the survey');
$rJSON->nextResponse(2); # pretend we just finished s0q2
$rJSON->processGotoExpression('jump { value(s0q0) == 3} END_SURVEY');
is($rJSON->nextResponse, 9, '..we can also jump to end with END_SURVEY target');