add calls to clear_syspref_cache()
authorGalen Charlton <galen.charlton@liblime.com>
Thu, 11 Dec 2008 15:48:51 +0000 (09:48 -0600)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 12 Dec 2008 13:53:06 +0000 (14:53 +0100)
temporary until mutator for sysprefs created

t/lib/KohaTest/Search/NoZebra.pm

index 3b1aee1..ade916a 100644 (file)
@@ -31,6 +31,7 @@ sub startup_50_init_nozebra : Test( startup => 3 ) {
     my $dbh = C4::Context->dbh;
     $dbh->do("UPDATE systempreferences SET value=1 WHERE variable='NoZebra'");
     $dbh->do("UPDATE systempreferences SET value=0 WHERE variable in ('QueryFuzzy','QueryWeightFields','QueryStemming')");
+    C4::Context->clear_syspref_cache();
     $using_nozebra = C4::Context->preference('NoZebra');
     ok($using_nozebra, "switched to NoZebra");
 
@@ -218,6 +219,7 @@ sub shutdown_50_init_nozebra : Test( shutdown => 3 ) {
     my $dbh = C4::Context->dbh;
     $dbh->do("UPDATE systempreferences SET value=0 WHERE variable='NoZebra'");
     $dbh->do("UPDATE systempreferences SET value=1 WHERE variable in ('QueryFuzzy','QueryWeightFields','QueryStemming')");
+    C4::Context->clear_syspref_cache();
     $using_nozebra = C4::Context->preference('NoZebra');
     ok(!$using_nozebra, "switched to Zebra");