Commit deb32d99 authored by David O'Regan's avatar David O'Regan Committed by Heinrich Lee Yu

Remove health status from incidents

Remove the health status feature from
incident sidebar.
parent 46164319
......@@ -14,6 +14,7 @@ module HealthStatus
override :supports_health_status?
def supports_health_status?
return false if incident?
return false unless resource_parent&.feature_available?(:issuable_health_status)
::Feature.enabled?(:save_issuable_health_status, resource_parent.try(:group), default_enabled: true)
......
---
title: Remove health status feature from incidents
merge_request: 40520
author:
type: changed
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe HealthStatus do
describe '#supports_health_status?' do
using RSpec::Parameterized::TableSyntax
let(:project_with_group) { build_stubbed(:project, group: group, creator: creator) }
let(:group) { build_stubbed(:group) }
let(:creator) { build_stubbed(:user) }
before do
stub_licensed_features(issuable_health_status: issuable_health_status)
stub_feature_flags(save_issuable_health_status: save_issuable_health_status)
end
where(:issuable_type, :issuable_health_status, :save_issuable_health_status, :supports_health_status) do
:issue | true | true | true
:issue | false | false | false
:issue | false | true | false
:issue | true | false | false
:incident | true | true | false
:incident | false | false | false
:incident | false | true | false
:incident | true | false | false
:merge_request | true | true | false
:merge_request | false | false | false
:merge_request | false | true | false
:merge_request | true | false | false
end
with_them do
let(:issuable) { build_stubbed(issuable_type, project: project_with_group) }
subject { issuable.supports_health_status? }
it { is_expected.to eq(supports_health_status) }
end
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