From 28a11f1feeb098566c6450418dfbcb9d22415b6f Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Thu, 19 Jun 2025 20:17:57 +1000 Subject: [PATCH] Enabled inventory by default Currently inventory is enabled by default, but we enventually want to disabled it by default. So we disable inventory for specs, it will be enabled on specific specs to test inventory related code path. --- lib/open_food_network/feature_toggle.rb | 3 +++ spec/base_spec_helper.rb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/open_food_network/feature_toggle.rb b/lib/open_food_network/feature_toggle.rb index 604f949084..4a0d38e552 100644 --- a/lib/open_food_network/feature_toggle.rb +++ b/lib/open_food_network/feature_toggle.rb @@ -76,6 +76,9 @@ module OpenFoodNetwork "admin_style_v3" => <<~DESC, Test the work-in-progress design updates. DESC + "inventory" => <<~DESC, + Enable the inventory. + DESC }.freeze def self.setup! diff --git a/spec/base_spec_helper.rb b/spec/base_spec_helper.rb index 7f7ef01a12..4257027014 100644 --- a/spec/base_spec_helper.rb +++ b/spec/base_spec_helper.rb @@ -158,6 +158,9 @@ RSpec.configure do |config| config.before(:each) do Flipper.features.each(&:remove) OpenFoodNetwork::FeatureToggle.setup! + # Inventory is currently enabled by default, but we enventually when to disable it by default. + # Disabling it here allows us to test inventory specific code path + Flipper.disable(:inventory) end config.before(:each, :feature) do |example|