Improved handling of Survey restart

This commit is contained in:
Patrick Donelan 2009-05-13 02:10:34 +00:00
parent 1d6831d055
commit 6815cd76aa
4 changed files with 39 additions and 53 deletions

View file

@ -18,7 +18,7 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
my $tests = 24;
my $tests = 25;
plan tests => $tests + 1;
#----------------------------------------------------------------------------
@ -116,9 +116,10 @@ cmp_deeply(
'submitQuestions does the right thing'
);
# Test out Restart
# Test Restart
$s->surveyEnd( { restart => 1 } );
cmp_deeply($s->responseJSON->responses, {}, 'restart removes the in-progress response');
ok($responseId ne $s->responseId, '..and uses a new responseId');
# Test out exitUrl with an explicit
use JSON;

View file

@ -14,7 +14,6 @@ use WebGUI::Test; # Must use this before any other WebGUI modules
use WebGUI::Session;
use JSON;
use Clone qw/clone/;
#use Storable qw/dclone/;
#----------------------------------------------------------------------------
# Init