diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/services/projects/alerting | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/services/projects/alerting')
-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 |