adds feature flag for admin/budgets management
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
class Admin::BudgetHeadingsController < Admin::BaseController
|
||||
include FeatureFlags
|
||||
feature_flag :budgets
|
||||
|
||||
def create
|
||||
@budget = Budget.find params[:budget_id]
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
class Admin::BudgetInvestmentsController < Admin::BaseController
|
||||
include FeatureFlags
|
||||
feature_flag :budgets
|
||||
|
||||
before_action :load_budget
|
||||
before_action :load_investment, only: [:show, :edit, :update]
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
class Admin::BudgetsController < Admin::BaseController
|
||||
include FeatureFlags
|
||||
feature_flag :budgets
|
||||
|
||||
has_filters %w{open finished}, only: :index
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
class BudgetsController < ApplicationController
|
||||
include FeatureFlags
|
||||
feature_flag :budgets
|
||||
|
||||
|
||||
load_and_authorize_resource
|
||||
respond_to :html, :js
|
||||
|
||||
@@ -9,6 +9,15 @@ feature 'Admin budget investments' do
|
||||
@budget = create(:budget)
|
||||
end
|
||||
|
||||
context "Feature flag" do
|
||||
|
||||
scenario 'Disabled with a feature flag' do
|
||||
Setting['feature.budgets'] = nil
|
||||
expect{ visit admin_budgets_path }.to raise_exception(FeatureFlags::FeatureDisabled)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context "Index" do
|
||||
|
||||
scenario 'Displaying investmentss' do
|
||||
|
||||
Reference in New Issue
Block a user