From 9fd6e94c03fa3bba09af2aed85d6664575385e9a Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 26 Feb 2013 16:53:57 -0500 Subject: Reverted Bug 836067 due to buglist crashing and do not yet know the reason --- xt/lib/Bugzilla/Test/Search/FieldTest.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'xt') diff --git a/xt/lib/Bugzilla/Test/Search/FieldTest.pm b/xt/lib/Bugzilla/Test/Search/FieldTest.pm index bd5fd905a..283a90d16 100644 --- a/xt/lib/Bugzilla/Test/Search/FieldTest.pm +++ b/xt/lib/Bugzilla/Test/Search/FieldTest.pm @@ -544,13 +544,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($search); + $results = $self->_test_sql($sql); } $self->_test_content($results, $sql); @@ -567,11 +567,12 @@ sub _test_search_object_creation { } sub _test_sql { - my ($self, $search) = @_; + my ($self, $sql) = @_; + my $dbh = Bugzilla->dbh; my $name = $self->name; my $results; - lives_ok { $results = $search->data } "$name: Run SQL Query" - or diag($search->_sql); + lives_ok { $results = $dbh->selectall_arrayref($sql) } "$name: Run SQL Query" + or diag($sql); return $results; } -- cgit v1.2.3-24-g4f1b