Fixed Survey test suite 'tagged' check to work with nested data

This commit is contained in:
Patrick Donelan 2009-06-03 07:15:52 +00:00
parent 61832b62b9
commit 5acade845a
2 changed files with 21 additions and 3 deletions

View file

@ -21,7 +21,7 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
plan tests => 85;
plan tests => 88;
my ( $s, $t1 );
@ -424,6 +424,23 @@ try_it( $t1, $spec, { tap => <<END_TAP } );
ok 1 - Checking tagged on page containing Section S1 Question S1Q0
END_TAP
# Complex tag object via setup option
$spec = <<END_SPEC;
[
{
"test" : {
"S1Q0" : "n",
"setup" : { tag: { nested: { a: { a: 1 }, b: [ 2 ] } } },
"tagged" : { nested: { a: { a: 1 }, b: [ 2 ] } },
},
},
]
END_SPEC
try_it( $t1, $spec, { tap => <<END_TAP } );
1..1
ok 1 - Checking tagged on page containing Section S1 Question S1Q0
END_TAP
# setup can also be specified inside test object
$spec = <<END_SPEC;
[