Bug 11499: (regression tests) indexing modes not properly set on generated koha-conf.xml
authorTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 8 Jan 2014 15:17:26 +0000 (12:17 -0300)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 10 Jan 2014 15:42:23 +0000 (15:42 +0000)
t/db_dependent/Search.t creates its own temporary koha-conf.xml and
related files, and it fails to properly set indexing modes for
bibliographic and authority records.

This patch adds regression tests for that.

To test:

 $ prove -v t/db_dependent/Search.t 2> /dev/null | grep 11499

The test should fail unless the main page is applied.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
t/db_dependent/Search.t

index b412709..2a7215d 100644 (file)
@@ -12,7 +12,7 @@ use YAML;
 use C4::Debug;
 require C4::Context;
 
-use Test::More tests => 208;
+use Test::More tests => 212;
 use Test::MockModule;
 use MARC::Record;
 use File::Spec;
@@ -178,6 +178,11 @@ sub run_marc21_search_tests {
     my $context = new C4::Context("$datadir/etc/koha-conf.xml");
     $context->set_context();
 
+    is($context->config('zebra_bib_index_mode'),$indexing_mode,
+        "zebra_bib_index_mode is properly set to '$indexing_mode' in the created koha-conf.xml file (BZ11499)");
+    is($context->config('zebra_auth_index_mode'),$indexing_mode,
+        "zebra_auth_index_mode is properly set to '$indexing_mode' in the created koha-conf.xml file (BZ11499)");
+
     use_ok('C4::Search');
 
     # set search syspreferences to a known starting point