Add feature flags on budget controllers
Although we had this feature flag in most places, we forgot to add it in some of the controllers.
This commit is contained in:
@@ -4,6 +4,14 @@ describe Budgets::GroupsController do
|
||||
describe "GET show" do
|
||||
let(:group) { create(:budget_group) }
|
||||
|
||||
it "raises an exception when the feature is disabled" do
|
||||
Setting["process.budgets"] = false
|
||||
|
||||
expect do
|
||||
get :show, params: { budget_id: group.budget.id, id: group.id }
|
||||
end.to raise_exception(FeatureFlags::FeatureDisabled)
|
||||
end
|
||||
|
||||
it "raises an error if budget slug is not found" do
|
||||
expect do
|
||||
get :show, params: { budget_id: "wrong_budget", id: group.id }
|
||||
|
||||
Reference in New Issue
Block a user