Commit 304f2ce2 authored by Clement Ho's avatar Clement Ho

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

Remove alert_management_detail feature flag

See merge request gitlab-org/gitlab!31877
parents 7aff7282 10d2b76d
# frozen_string_literal: true
class Projects::AlertManagementController < Projects::ApplicationController
before_action :ensure_detail_feature_enabled, only: :details
before_action :authorize_read_alert_management_alert!
before_action do
push_frontend_feature_flag(:alert_list_status_filtering_enabled)
......@@ -14,10 +13,4 @@ class Projects::AlertManagementController < Projects::ApplicationController
def details
@alert_id = params[:id]
end
private
def ensure_detail_feature_enabled
render_404 unless Feature.enabled?(:alert_management_detail, project)
end
end
---
title: Add Alert Detail view
merge_request: 31877
author:
type: added
......@@ -32,11 +32,6 @@ describe Projects::AlertManagementController do
end
describe 'GET #details' do
context 'when alert_management_detail is enabled' do
before do
stub_feature_flags(alert_management_detail: true)
end
it 'shows the page' do
get :details, params: { namespace_id: project.namespace, project_id: project, id: id }
......@@ -54,19 +49,6 @@ describe Projects::AlertManagementController do
end
end
context 'when alert_management_detail is disabled' do
before do
stub_feature_flags(alert_management_detail: false)
end
it 'shows 404' do
get :details, params: { namespace_id: project.namespace, project_id: project, id: id }
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
describe 'set_alert_id' do
it 'sets alert id from the route' do
get :details, params: { namespace_id: project.namespace, project_id: project, id: id }
......
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