summaryrefslogtreecommitdiffstats
path: root/xt/lib
diff options
context:
space:
mode:
Diffstat (limited to 'xt/lib')
-rw-r--r--xt/lib/Bugzilla/Test/Search/FieldTest.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/xt/lib/Bugzilla/Test/Search/FieldTest.pm b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
index ee25f2dc6..a625127c9 100644
--- a/xt/lib/Bugzilla/Test/Search/FieldTest.pm
+++ b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
@@ -562,13 +562,13 @@ sub do_tests {
my $sql;
TODO: {
local $TODO = $search_broken if $search_broken;
- lives_ok { $sql = $search->sql } "$name: generate SQL";
+ lives_ok { $sql = $search->_sql } "$name: generate SQL";
}
my $results;
SKIP: {
skip "Can't run SQL without any SQL", 1 if !defined $sql;
- $results = $self->_test_sql($sql);
+ $results = $self->_test_sql($search);
}
$self->_test_content($results, $sql);
@@ -585,12 +585,11 @@ sub _test_search_object_creation {
}
sub _test_sql {
- my ($self, $sql) = @_;
- my $dbh = Bugzilla->dbh;
+ my ($self, $search) = @_;
my $name = $self->name;
my $results;
- lives_ok { $results = $dbh->selectall_arrayref($sql) } "$name: Run SQL Query"
- or diag($sql);
+ lives_ok { $results = $search->data } "$name: Run SQL Query"
+ or diag($search->_sql);
return $results;
}