From 3e2aa3e23cffab13ce2d14b4d5b9fcd3b622c1d9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 14 Dec 2015 12:56:39 +0000 Subject: [PATCH] Bug 12803 [QA Followup] - Remove NO_CACHE --- Koha/Calendar.pm | 2 +- t/db_dependent/HoldsQueue.t | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index 5904dee..5d60a84 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -104,7 +104,7 @@ sub single_holidays { # ... # } - if (!$single_holidays || $ENV{NO_CACHE}) { + if (!$single_holidays) { my $dbh = C4::Context->dbh; $single_holidays = {}; diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t index b0fa116..dc00397 100755 --- a/t/db_dependent/HoldsQueue.t +++ b/t/db_dependent/HoldsQueue.t @@ -8,7 +8,7 @@ use Modern::Perl; -use Test::More tests => 25; +use Test::More tests => 26; use Data::Dumper; use C4::Branch; @@ -307,7 +307,6 @@ is( $holds_queue->[1]->{cardnumber}, $borrower2->{cardnumber}, "Holds queue fill # and make today a holiday for MPL. When we run it again we should only # have 1 row in the holds queue C4::Context->set_preference('HoldsQueueSkipClosed', 1); -$ENV{NO_CACHE} = 1; my $today = dt_from_string(); C4::Calendar->new( branchcode => $branchcodes[0] )->insert_single_holiday( day => $today->day(), @@ -316,6 +315,7 @@ C4::Calendar->new( branchcode => $branchcodes[0] )->insert_single_holiday( title => "$today", description => "$today", ); +is( Koha::Calendar->new( branchcode => $branchcodes[0] )->is_holiday( $today ), 1, 'Is today a holiday for pickup branch' ); C4::HoldsQueue::CreateQueue(); $holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} }); is( scalar( @$holds_queue ), 1, "Holds not filled with items from closed libraries" ); @@ -336,7 +336,6 @@ C4::Context->set_preference( 'HoldsQueueSkipClosed', 1 ); C4::HoldsQueue::CreateQueue(); $holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} }); is( scalar( @$holds_queue ), 2, "Holds not filled with items from closed libraries" ); -$ENV{NO_CACHE} = 0; C4::Context->set_preference( 'HoldsQueueSkipClosed', 0 ); # Bug 14297 -- 1.7.10.4