diff options
Diffstat (limited to 'spec/helpers/projects/alert_management_helper_spec.rb')
-rw-r--r-- | spec/helpers/projects/alert_management_helper_spec.rb | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/spec/helpers/projects/alert_management_helper_spec.rb b/spec/helpers/projects/alert_management_helper_spec.rb index 2450f7838b3..0a5c4bedaa6 100644 --- a/spec/helpers/projects/alert_management_helper_spec.rb +++ b/spec/helpers/projects/alert_management_helper_spec.rb @@ -34,7 +34,6 @@ RSpec.describe Projects::AlertManagementHelper do 'empty-alert-svg-path' => match_asset_path('/assets/illustrations/alert-management-empty-state.svg'), 'user-can-enable-alert-management' => 'true', 'alert-management-enabled' => 'false', - 'has-managed-prometheus' => 'false', 'text-query': nil, 'assignee-username-query': nil ) @@ -45,52 +44,26 @@ RSpec.describe Projects::AlertManagementHelper do let_it_be(:prometheus_integration) { create(:prometheus_integration, project: project) } context 'when manual prometheus integration is active' do - it "enables alert management and doesn't show managed prometheus" do + it "enables alert management" do prometheus_integration.update!(manual_configuration: true) expect(data).to include( 'alert-management-enabled' => 'true' ) - expect(data).to include( - 'has-managed-prometheus' => 'false' - ) - end - end - - context 'when a cluster prometheus is available' do - let(:cluster) { create(:cluster, projects: [project]) } - - it 'has managed prometheus' do - create(:clusters_integrations_prometheus, cluster: cluster) - - expect(data).to include( - 'has-managed-prometheus' => 'true' - ) end end - context 'when prometheus integration is inactive' do - it 'disables alert management and hides managed prometheus' do + context 'when prometheus service is inactive' do + it 'disables alert management' do prometheus_integration.update!(manual_configuration: false) expect(data).to include( 'alert-management-enabled' => 'false' ) - expect(data).to include( - 'has-managed-prometheus' => 'false' - ) end end end - context 'without prometheus integration' do - it "doesn't have managed prometheus" do - expect(data).to include( - 'has-managed-prometheus' => 'false' - ) - end - end - context 'with http integration' do let_it_be(:integration) { create(:alert_management_http_integration, project: project) } |