@@ -, +, @@ --- t/db_dependent/Context.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/t/db_dependent/Context.t +++ a/t/db_dependent/Context.t @@ -53,7 +53,6 @@ $module->mock( ); my $history; -C4::Context->disable_syspref_cache(); $dbh = C4::Context->dbh({ new => 1 }); $dbh->{mock_add_resultset} = [ ['value'], ['thing1'] ]; @@ -82,7 +81,8 @@ is(scalar(@{$history}), 1, 'Retrieved syspref from database'); C4::Context->enable_syspref_cache(); $dbh->{mock_clear_history} = 1; -is(C4::Context->preference("SillyPreference"), 'thing3', "Retrieved syspref (value='thing3') successfully from cache"); +# This gives us the value that was cached on the first call, when the cache was active. +is(C4::Context->preference("SillyPreference"), 'thing1', "Retrieved syspref (value='thing1') successfully from cache"); $history = $dbh->{mock_all_history}; is(scalar(@{$history}), 0, 'Did not retrieve syspref from database'); --