Bug 10271: regression test for search using indexes containing 'ns'

This patch adds a regression test for doing a form-based catalog
search using an index that contains the string 'ns' in its name.  In
this case, the index being tested is 'Code-institution'.

To test
-------
[1] Prove -v t/db_dependent/Search.t should have two failed tests;
    one each for GRS-1 and DOM testing.
[2] After applying the main patch for this bug, the tests should
    pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Galen Charlton 2013-10-28 15:34:15 +00:00
parent b499255d75
commit 935ed2876b
1 changed files with 7 additions and 1 deletions

View File

@ -12,7 +12,7 @@ use YAML;
use C4::Debug;
require C4::Context;
use Test::More tests => 194;
use Test::More tests => 196;
use Test::MockModule;
use MARC::Record;
use File::Spec;
@ -451,6 +451,12 @@ sub run_marc21_search_tests {
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0);
is($results_hashref->{biblioserver}->{hits}, 2, "getRecords generated multi-faceted search matched right number of records");
( $error, $query, $simple_query, $query_cgi,
$query_desc, $limit, $limit_cgi, $limit_desc,
$stopwords_removed, $query_type ) = buildQuery([], [ 'NEKLS' ], [ 'Code-institution' ], [], [], 0, 'en');
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0);
is($results_hashref->{biblioserver}->{hits}, 12,
'search using index whose name contains "ns" returns expected results (bug 10271)');
# FIXME: the availability limit does not actually work, so for the moment we
# are just checking that it behaves consistently