From bb97c350e86d9724e3c6640677abf2ffdd029494 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 12 Apr 2016 15:26:44 -0300 Subject: [PATCH] [PASSED QA] Bug 16249: Zebra-specific tests should pass with ES disabled This patch makes the t/db_dependent/Search.t tests correctly set 'Zebra' for the 'SearchEngine' syspref. To test: - On top of bug 12478 branch, run $ prove t/db_dependent/Search.t => FAIL: Tests fail - Apply the patch - Run: $ prove t/db_dependent/Search.t => SUCCESS: Tests now pass. Signed-off-by: Chris Signed-off-by: Katrin Fischer --- t/db_dependent/Search.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index c61c583..aeec564 100644 --- a/t/db_dependent/Search.t +++ b/t/db_dependent/Search.t @@ -93,6 +93,7 @@ our $QueryAutoTruncate = 0; our $QueryWeightFields = 0; our $QueryFuzzy = 0; our $UseQueryParser = 0; +our $SearchEngine = 'Zebra'; our $marcflavour = 'MARC21'; our $contextmodule = new Test::MockModule('C4::Context'); $contextmodule->mock('preference', sub { @@ -109,6 +110,8 @@ $contextmodule->mock('preference', sub { return $QueryFuzzy; } elsif ($pref eq 'UseQueryParser') { return $UseQueryParser; + } elsif ($pref eq 'SearchEngine') { + return $SearchEngine; } elsif ($pref eq 'maxRecordsForFacets') { return 20; } elsif ($pref eq 'FacetLabelTruncationLength') { -- 1.9.1