Commit 38510e7c authored by Sean Arnold's avatar Sean Arnold Committed by Ash McKenzie

Hide Status Page Operations Settings behind a beta feature flag

parent 4fb5d866
......@@ -42,7 +42,8 @@ module EE
end
def has_status_page_license?
project.feature_available?(:status_page, current_user)
project.feature_available?(:status_page, current_user) &&
project.beta_feature_available?(:status_page)
end
def track_tracing_external_url
......
- return unless @project.feature_available?(:status_page, current_user)
- return unless @project.feature_available?(:status_page, current_user) && @project.beta_feature_available?(:status_page)
- setting = status_page_settings_data(@project.status_page_setting)
......
......@@ -288,11 +288,21 @@ describe Projects::Settings::OperationsController do
project.add_maintainer(user)
end
it 'creates a status page setting' do
subject(:status_page_setting) do
valid_attributes = attributes_for(:status_page_setting).except(:enabled)
update_project(project, status_page_params: valid_attributes )
expect(project.status_page_setting).not_to eq(nil)
expect(project.status_page_setting).to be_a(StatusPageSetting)
project.status_page_setting
end
it { is_expected.to be_a(StatusPageSetting) }
context 'when feature flag is disabled' do
before do
stub_feature_flags(status_page: false)
end
it { is_expected.to be_nil }
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment