diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-05-13 21:56:44 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-05-13 21:56:44 +0200 |
commit | c3a935575033f36a07eb411de7715a47af358228 (patch) | |
tree | 66d6ef328501d86875a07c6198b517f66daf0221 /xt/lib/Bugzilla/Test/Search.pm | |
parent | e39f635e0dc10c3f1084f762341ea91efd0ae21e (diff) | |
download | bugzilla-c3a935575033f36a07eb411de7715a47af358228.tar.gz bugzilla-c3a935575033f36a07eb411de7715a47af358228.tar.xz |
Bug 656790 - Create a basic framework for testing custom search
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'xt/lib/Bugzilla/Test/Search.pm')
-rw-r--r-- | xt/lib/Bugzilla/Test/Search.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xt/lib/Bugzilla/Test/Search.pm b/xt/lib/Bugzilla/Test/Search.pm index f718f866f..133996283 100644 --- a/xt/lib/Bugzilla/Test/Search.pm +++ b/xt/lib/Bugzilla/Test/Search.pm @@ -58,6 +58,7 @@ use Bugzilla::FlagType; use Bugzilla::Group; use Bugzilla::Install (); use Bugzilla::Test::Search::Constants; +use Bugzilla::Test::Search::CustomTest; use Bugzilla::Test::Search::FieldTestNormal; use Bugzilla::Test::Search::OperatorTest; use Bugzilla::User (); @@ -111,7 +112,8 @@ sub num_tests { # This @{ [] } thing is the only reasonable way to get a count out of a # constant array. - my $special_tests = scalar(@{ [SPECIAL_PARAM_TESTS] }) * TESTS_PER_RUN; + my $special_tests = scalar(@{ [SPECIAL_PARAM_TESTS, CUSTOM_SEARCH_TESTS] }) + * TESTS_PER_RUN; return $operator_field_tests + $sql_injection_tests + $special_tests; } @@ -882,6 +884,10 @@ sub run { # Even though _setup_bugs set us as an admin, we want to be sure at # this point that we have an admin with refreshed group memberships. Bugzilla->set_user($self->admin); + foreach my $test (CUSTOM_SEARCH_TESTS) { + my $custom_test = new Bugzilla::Test::Search::CustomTest($test, $self); + $custom_test->run(); + } foreach my $test (SPECIAL_PARAM_TESTS) { my $operator_test = new Bugzilla::Test::Search::OperatorTest($test->{operator}, $self); |