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

@ -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, <<END_WHY);
Compared tag '$tagKey'
@ -686,7 +687,7 @@ END_WHY
my $currentTags = $rJSON->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, <<END_WHY);
Compared tag '$tagKey'