Commit be628d20 authored by Dmytro Zaporozhets's avatar Dmytro Zaporozhets

Merge branch 'tr-alert-detail-feature-flag' into 'master'

Move Alert Detail view to new feature flag

See merge request gitlab-org/gitlab!31175
parents 3df9df27 f7525758
# frozen_string_literal: true
class Projects::AlertManagementController < Projects::ApplicationController
before_action :ensure_feature_enabled
before_action :ensure_list_feature_enabled, only: :index
before_action :ensure_detail_feature_enabled, only: :details
def index
end
......@@ -11,7 +12,11 @@ class Projects::AlertManagementController < Projects::ApplicationController
private
def ensure_feature_enabled
def ensure_list_feature_enabled
render_404 unless Feature.enabled?(:alert_management_minimal, project)
end
def ensure_detail_feature_enabled
render_404 unless Feature.enabled?(:alert_management_detail, project)
end
end
......@@ -40,9 +40,9 @@ describe Projects::AlertManagementController do
end
describe 'GET #details' do
context 'when alert_management_minimal is enabled' do
context 'when alert_management_detail is enabled' do
before do
stub_feature_flags(alert_management_minimal: true)
stub_feature_flags(alert_management_detail: true)
end
it 'shows the page' do
......@@ -52,9 +52,9 @@ describe Projects::AlertManagementController do
end
end
context 'when alert_management_minimal is disabled' do
context 'when alert_management_detail is disabled' do
before do
stub_feature_flags(alert_management_minimal: false)
stub_feature_flags(alert_management_detail: false)
end
it 'shows 404' do
......
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