From 5acade845a29b001d4267d0a933a340f11c8ca06 Mon Sep 17 00:00:00 2001 From: Patrick Donelan Date: Wed, 3 Jun 2009 07:15:52 +0000 Subject: [PATCH] Fixed Survey test suite 'tagged' check to work with nested data --- lib/WebGUI/Asset/Wobject/Survey/Test.pm | 5 +++-- t/Asset/Wobject/Survey/Test.t | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/Survey/Test.pm b/lib/WebGUI/Asset/Wobject/Survey/Test.pm index 0c04086fb..34b87320d 100644 --- a/lib/WebGUI/Asset/Wobject/Survey/Test.pm +++ b/lib/WebGUI/Asset/Wobject/Survey/Test.pm @@ -670,7 +670,8 @@ END_WHY return fail($testCount, $name, "Tag not found: $tagKey"); } my $currentTagValue = $currentTags->{$tagKey}; - if ($currentTagValue != $tagValue) { + + if (!eq_deeply($currentTagValue, $tagValue)) { $self->session->log->debug("Incorrect tag value: $currentTagValue != $tagValue"); return fail($testCount, $name, <tags; while (my ($tagKey, $tagValue) = each %$tagged) { my $currentTagValue = $currentTags->{$tagKey}; - if ($currentTagValue != $tagValue) { + if (!eq_deeply($currentTagValue, $tagValue)) { $self->session->log->debug("Incorrect tag value: $currentTagValue != $tagValue"); return fail($testCount, $name, <session; #---------------------------------------------------------------------------- # Tests -plan tests => 85; +plan tests => 88; my ( $s, $t1 ); @@ -424,6 +424,23 @@ try_it( $t1, $spec, { tap => < <