mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Consistently use our FeatureToggle module
Direct calls to Flipper have the downside that we can't add any new functionality like storing the feature in the database when used.
This commit is contained in:
@@ -16,8 +16,10 @@ describe SplitCheckoutController, type: :controller do
|
||||
let(:shipping_method) { distributor.shipping_methods.first }
|
||||
|
||||
before do
|
||||
allow(Flipper).to receive(:enabled?).with(:split_checkout) { true }
|
||||
allow(Flipper).to receive(:enabled?).with(:split_checkout, anything) { true }
|
||||
allow(OpenFoodNetwork::FeatureToggle).
|
||||
to receive(:enabled?).with(:split_checkout) { true }
|
||||
allow(OpenFoodNetwork::FeatureToggle).
|
||||
to receive(:enabled?).with(:split_checkout, anything) { true }
|
||||
|
||||
exchange.variants << order.line_items.first.variant
|
||||
allow(controller).to receive(:current_order) { order }
|
||||
|
||||
Reference in New Issue
Block a user