summaryrefslogtreecommitdiffstats
path: root/xt/lib/Bugzilla/Test
diff options
context:
space:
mode:
Diffstat (limited to 'xt/lib/Bugzilla/Test')
-rw-r--r--xt/lib/Bugzilla/Test/Search/FieldTest.pm15
1 files changed, 6 insertions, 9 deletions
diff --git a/xt/lib/Bugzilla/Test/Search/FieldTest.pm b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
index 7ebf760d1..4d24c5bd3 100644
--- a/xt/lib/Bugzilla/Test/Search/FieldTest.pm
+++ b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
@@ -497,20 +497,17 @@ sub do_tests {
my $search_broken = $self->search_known_broken;
- my $search;
+ my $search = $self->_test_search_object_creation();
+
+ my $sql;
TODO: {
local $TODO = $search_broken if $search_broken;
- $search = $self->_test_search_object_creation();
+ lives_ok { $sql = $search->sql } "$name: generate SQL";
}
- my ($results, $sql);
+ my $results;
SKIP: {
- skip "Can't run SQL without Search object", 2 if !$search;
- lives_ok { $sql = $search->getSQL() } "$name: get SQL";
-
- # This prevents warnings from DBD::mysql if we pass undef $sql,
- # which happens if "new Bugzilla::Search" fails.
- $sql ||= '';
+ skip "Can't run SQL without any SQL", 1 if !defined $sql;
$results = $self->_test_sql($sql);
}