Add missing feature flag detection specs

This commit is contained in:
Javi Martín
2021-03-31 14:27:19 +02:00
parent 02981324ab
commit 9981202c45
3 changed files with 26 additions and 0 deletions

View File

@@ -1,6 +1,14 @@
require "rails_helper"
describe BudgetsController do
describe "GET index" do
it "raises an exception when the feature is disabled" do
Setting["process.budgets"] = false
expect { get :index }.to raise_exception(FeatureFlags::FeatureDisabled)
end
end
describe "GET show" do
it "raises an error if budget slug is not found" do
expect do