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.
This commit is contained in:
Gaetan Craig-Riou
2025-06-19 20:17:57 +10:00
parent 1c4febd332
commit 28a11f1fee
2 changed files with 6 additions and 0 deletions

View File

@@ -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!

View File

@@ -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|