]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Change the way that the xt/search.t injection tests look for known broken
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Sat, 2 Oct 2010 19:45:23 +0000 (12:45 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Sat, 2 Oct 2010 19:45:23 +0000 (12:45 -0700)
tests, so that the Pg tests properly understand that they can't test
creation_ts changedafter or changedbefore, *ever*.

https://bugzilla.mozilla.org/show_bug.cgi?id=600496

xt/lib/Bugzilla/Test/Search/InjectionTest.pm

index 1ee83c57c7ded5aaf7c27e890eaf0b9e5ea28483..1bd9fd82c61c44aaed15a7ac32387b1ad71fab23 100644 (file)
@@ -37,15 +37,14 @@ sub _known_broken {
     # We don't want to auto-vivify $operator_broken and thus make it true.
     my @field_ok = $operator_broken ? @{ $operator_broken->{field_ok} || [] }
                                     : ();
-
-    return {} if grep { $_ eq $self->field } @field_ok;
+    $operator_broken = undef if grep { $_ eq $self->field } @field_ok;
 
     my $field_broken = INJECTION_BROKEN_FIELD->{$self->field}
                        || INJECTION_BROKEN_FIELD->{$self->field_object->type};
     # We don't want to auto-vivify $field_broken and thus make it true.
     my @operator_ok = $field_broken ? @{ $field_broken->{operator_ok} || [] }
                                     : ();
-    return {} if grep { $_ eq $self->operator } @operator_ok;
+    $field_broken = undef if grep { $_ eq $self->operator } @operator_ok;
 
     return $operator_broken || $field_broken || {};
 }