diff options
Diffstat (limited to 'spec/services/projects/alerting/notify_service_spec.rb')
-rw-r--r-- | spec/services/projects/alerting/notify_service_spec.rb | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/spec/services/projects/alerting/notify_service_spec.rb b/spec/services/projects/alerting/notify_service_spec.rb index 123b0bad2a8..3e74a15c3c0 100644 --- a/spec/services/projects/alerting/notify_service_spec.rb +++ b/spec/services/projects/alerting/notify_service_spec.rb @@ -30,21 +30,6 @@ RSpec.describe Projects::Alerting::NotifyService do end end - shared_examples 'sends notification email' do - let(:notification_service) { spy } - - it 'sends a notification for firing alerts only' do - expect(NotificationService) - .to receive(:new) - .and_return(notification_service) - - expect(notification_service) - .to receive_message_chain(:async, :prometheus_alerts_fired) - - expect(subject).to be_success - end - end - shared_examples 'does not process incident issues' do it 'does not process issues' do expect(IncidentManagement::ProcessAlertWorker) @@ -81,6 +66,7 @@ RSpec.describe Projects::Alerting::NotifyService do fingerprint: fingerprint }.with_indifferent_access end + let(:payload) { ActionController::Parameters.new(payload_raw).permit! } subject { service.execute(token) } @@ -234,7 +220,7 @@ RSpec.describe Projects::Alerting::NotifyService do context 'with emails turned on' do let(:email_enabled) { true } - it_behaves_like 'sends notification email' + it_behaves_like 'Alert Notification Service sends notification email' end end |