From 01d5e594f10c6a2f658d35c67f047d22fb1dc532 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Thu, 20 Nov 2014 15:51:17 +1300 Subject: [PATCH] Bug 11998 - fix test case so it's testing the cache properly --- t/db_dependent/Context.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Context.t b/t/db_dependent/Context.t index f90fdab..40f6ed1 100755 --- a/t/db_dependent/Context.t +++ b/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'); -- 1.9.1