From a0abe47ca532705c222e66c9c2bdec89246f5874 Mon Sep 17 00:00:00 2001 From: James Rose Date: Fri, 31 Mar 2023 09:14:55 +0100 Subject: [PATCH] Enable 23-24 feature flag in production --- config/initializers/feature_toggle.rb | 2 +- spec/helpers/filters_helper_spec.rb | 28 ++++++--------------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/config/initializers/feature_toggle.rb b/config/initializers/feature_toggle.rb index de1c11fbd..11f83e621 100644 --- a/config/initializers/feature_toggle.rb +++ b/config/initializers/feature_toggle.rb @@ -55,6 +55,6 @@ class FeatureToggle end def self.collection_2023_2024_year_enabled? - !Rails.env.production? + true end end diff --git a/spec/helpers/filters_helper_spec.rb b/spec/helpers/filters_helper_spec.rb index 3eccac743..53d06e3e8 100644 --- a/spec/helpers/filters_helper_spec.rb +++ b/spec/helpers/filters_helper_spec.rb @@ -118,28 +118,12 @@ RSpec.describe FiltersHelper do end describe "#collection_year_options" do - context "when not production" do - it "includes 2023/2024 option" do - expect(collection_year_options).to eq( - { - "2021": "2021/22", "2022": "2022/23", "2023": "2023/24" - }, - ) - end - end - - context "when production" do - before do - allow(Rails.env).to receive(:production?).and_return(true) - end - - it "includes 2023/2024 option" do - expect(collection_year_options).to eq( - { - "2021": "2021/22", "2022": "2022/23" - }, - ) - end + it "includes 2023/2024 option" do + expect(collection_year_options).to eq( + { + "2021": "2021/22", "2022": "2022/23", "2023": "2023/24" + }, + ) end end end