Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 12:09:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 12:09:20 +0300
commitfc1df8c8307fc5022f9e8aae04164c089d8fdf2e (patch)
treea759f58abf9e41200c48a60de73c84cab47a250d /spec/services/system_notes
parentc8df22c555ab707a705e57c4257fd3ed1ce7c3b0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/system_notes')
-rw-r--r--spec/services/system_notes/issuables_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/system_notes/issuables_service_spec.rb b/spec/services/system_notes/issuables_service_spec.rb
index c0aaa65971a..477f9eae39e 100644
--- a/spec/services/system_notes/issuables_service_spec.rb
+++ b/spec/services/system_notes/issuables_service_spec.rb
@@ -654,4 +654,16 @@ describe ::SystemNotes::IssuablesService do
.to eq('resolved the corresponding error and closed the issue.')
end
end
+
+ describe '#auto_resolve_prometheus_alert' do
+ subject { service.auto_resolve_prometheus_alert }
+
+ it_behaves_like 'a system note' do
+ let(:action) { 'closed' }
+ end
+
+ it 'creates the expected system note' do
+ expect(subject.note).to eq('automatically closed this issue because the alert resolved.')
+ end
+ end
end