summaryrefslogtreecommitdiff
path: root/spec/services/system_note_service_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-27 18:10:29 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-27 18:10:29 +0000
commitda50206243972a4cafcaea7539aed7c6986c775e (patch)
tree4078741032de093f8ae49a13ec984271402f2f35 /spec/services/system_note_service_spec.rb
parenteef9c80f1c3e81fcb50c51d8f419ab095d4747fd (diff)
downloadgitlab-ce-da50206243972a4cafcaea7539aed7c6986c775e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/system_note_service_spec.rb')
-rw-r--r--spec/services/system_note_service_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb
index 0f5558738ac..cf2ccce448b 100644
--- a/spec/services/system_note_service_spec.rb
+++ b/spec/services/system_note_service_spec.rb
@@ -739,4 +739,17 @@ RSpec.describe SystemNoteService do
described_class.new_alert_issue(alert, alert.issue, author)
end
end
+
+ describe '.create_new_alert' do
+ let(:alert) { build(:alert_management_alert) }
+ let(:monitoring_tool) { 'Prometheus' }
+
+ it 'calls AlertManagementService' do
+ expect_next_instance_of(SystemNotes::AlertManagementService) do |service|
+ expect(service).to receive(:create_new_alert).with(monitoring_tool)
+ end
+
+ described_class.create_new_alert(alert, monitoring_tool)
+ end
+ end
end