diff options
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/alert_management/process_prometheus_alert_service_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/alert_management/process_prometheus_alert_service_spec.rb b/spec/services/alert_management/process_prometheus_alert_service_spec.rb index 0ce88f6b5b7..533e2473cb8 100644 --- a/spec/services/alert_management/process_prometheus_alert_service_spec.rb +++ b/spec/services/alert_management/process_prometheus_alert_service_spec.rb @@ -83,6 +83,15 @@ RSpec.describe AlertManagement::ProcessPrometheusAlertService do context 'when alert does not exist' do context 'when alert can be created' do it_behaves_like 'creates an alert management alert' + + it 'processes the incident alert' do + expect(IncidentManagement::ProcessAlertWorker) + .to receive(:perform_async) + .with(nil, nil, kind_of(Integer)) + .once + + expect(subject).to be_success + end end context 'when alert cannot be created' do @@ -102,6 +111,13 @@ RSpec.describe AlertManagement::ProcessPrometheusAlertService do execute end + + it 'does not create incident issue' do + expect(IncidentManagement::ProcessAlertWorker) + .not_to receive(:perform_async) + + expect(subject).to be_success + end end it { is_expected.to be_success } |