Commit 10d2b76d authored by Tristan Read's avatar Tristan Read Committed by Clement Ho

Remove alert_management_detail feature flag

parent a62bea15
# 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,35 +32,17 @@ 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 }
expect(response).to have_gitlab_http_status(:ok)
end
context 'when user is unauthorized' do
let(:role) { :reporter }
it 'shows 404' do
get :index, params: { namespace_id: project.namespace, project_id: project }
it 'shows the page' do
get :details, params: { namespace_id: project.namespace, project_id: project, id: id }
expect(response).to have_gitlab_http_status(:not_found)
end
end
expect(response).to have_gitlab_http_status(:ok)
end
context 'when alert_management_detail is disabled' do
before do
stub_feature_flags(alert_management_detail: false)
end
context 'when user is unauthorized' do
let(:role) { :reporter }
it 'shows 404' do
get :details, params: { namespace_id: project.namespace, project_id: project, id: id }
get :index, params: { namespace_id: project.namespace, project_id: project }
expect(response).to have_gitlab_http_status(:not_found)
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