From 5e9db959ad1719d5b33ce990aaea1663cc822130 Mon Sep 17 00:00:00 2001 From: Patrick Donelan Date: Fri, 24 Apr 2009 03:43:40 +0000 Subject: [PATCH] Added another Survey ResponseJSON test --- t/Asset/Wobject/Survey/ResponseJSON.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/Asset/Wobject/Survey/ResponseJSON.t b/t/Asset/Wobject/Survey/ResponseJSON.t index fb84d8091..b740f6b3c 100644 --- a/t/Asset/Wobject/Survey/ResponseJSON.t +++ b/t/Asset/Wobject/Survey/ResponseJSON.t @@ -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');