Bug 21479: "Mock" SearchEngine to use Zebra

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2018-10-15 14:53:35 -03:00 committed by Nick Clemens
parent 82ff8138b4
commit dc6bea7860

View file

@ -21,6 +21,7 @@ use C4::Context;
use Test::More tests => 2; use Test::More tests => 2;
use C4::Context;
use Koha::AuthUtils; use Koha::AuthUtils;
use t::lib::Selenium; use t::lib::Selenium;
use t::lib::TestBuilder; use t::lib::TestBuilder;
@ -34,6 +35,10 @@ my $driver = $s->driver;
my $opac_base_url = $s->opac_base_url; my $opac_base_url = $s->opac_base_url;
my $builder = t::lib::TestBuilder->new; my $builder = t::lib::TestBuilder->new;
# It seems that we do not have enough records indexed with ES
my $SearchEngine_value = C4::Context->preference('SearchEngine');
C4::Context->set_preference('SearchEngine', 'Zebra');
our @cleanup; our @cleanup;
subtest 'OPAC - borrowernumber and branchcode as html attributes' => sub { subtest 'OPAC - borrowernumber and branchcode as html attributes' => sub {
plan tests => 2; plan tests => 2;
@ -89,5 +94,6 @@ subtest 'OPAC - Remove from cart' => sub {
}; };
END { END {
C4::Context->preference('SearchEngine', $SearchEngine_value);
$_->delete for @cleanup; $_->delete for @cleanup;
}; };