Commit Graph

8 Commits

Author SHA1 Message Date
Maikel Linke
1e77b96c2c Simplify negated feature toggle constraint 2023-01-11 10:10:30 +00:00
Maikel Linke
36c44a5487 Allow FeatureToggleConstraint to run w/o warden
Routing specs and controller specs don't set warden on the request
environment. While we could try to re-implement Warden/Devise logic
here, it's much easier to not rely on the environment to be set.

While I'm usually opposed to changing production code to make testing
easier, it does avoid a lot of complication in this case. And maybe it
would be handy in other circumstances to have a more defensive approach
to checking the logged in user.
2022-10-27 15:07:04 +11:00
Maikel Linke
6aefc23c35 Allow devs to lazy-load app with right dependency 2022-10-26 14:08:27 +11:00
Maikel Linke
81461684f3 Generalise feature toggle constraint
Now we can re-use it for any feature.
2022-10-13 10:42:20 +11:00
Jean-Baptiste Bellet
f60068c0ce Use the proxy OpenFoodNetwork::FeatureToggle
that actually call Flipper.enabled?
2022-02-11 11:19:00 +01:00
Jean-Baptiste Bellet
e50247db5a Directly used the user in the request
not the memoized one @spree_current_user
2022-02-11 11:19:00 +01:00
Luis Azcuaga
e8fd89a6d2 Run rubocop over existing todo 2021-10-25 21:28:28 -05:00
Andy Brett
af79969d96 add SplitCheckoutController and conditional route 2021-07-26 15:47:36 +02:00