summaryrefslogtreecommitdiff
path: root/spec/services/system_notes
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /spec/services/system_notes
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
downloadgitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/services/system_notes')
-rw-r--r--spec/services/system_notes/alert_management_service_spec.rb16
-rw-r--r--spec/services/system_notes/design_management_service_spec.rb1
2 files changed, 16 insertions, 1 deletions
diff --git a/spec/services/system_notes/alert_management_service_spec.rb b/spec/services/system_notes/alert_management_service_spec.rb
index 403763d5fd9..943d7f55af4 100644
--- a/spec/services/system_notes/alert_management_service_spec.rb
+++ b/spec/services/system_notes/alert_management_service_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe ::SystemNotes::AlertManagementService do
describe '#new_alert_issue' do
let_it_be(:issue) { noteable.issue }
- subject { described_class.new(noteable: noteable, project: project, author: author).new_alert_issue(noteable, issue) }
+ subject { described_class.new(noteable: noteable, project: project, author: author).new_alert_issue(issue) }
it_behaves_like 'a system note' do
let(:action) { 'alert_issue_added' }
@@ -32,4 +32,18 @@ RSpec.describe ::SystemNotes::AlertManagementService do
expect(subject.note).to eq("created issue #{issue.to_reference(project)} for this alert")
end
end
+
+ describe '#closed_alert_issue' do
+ let_it_be(:issue) { noteable.issue }
+
+ subject { described_class.new(noteable: noteable, project: project, author: author).closed_alert_issue(issue) }
+
+ it_behaves_like 'a system note' do
+ let(:action) { 'status' }
+ end
+
+ it 'has the appropriate message' do
+ expect(subject.note).to eq("changed the status to **Resolved** by closing issue #{issue.to_reference(project)}")
+ end
+ end
end
diff --git a/spec/services/system_notes/design_management_service_spec.rb b/spec/services/system_notes/design_management_service_spec.rb
index 6267ad2aaad..19e1f338eb8 100644
--- a/spec/services/system_notes/design_management_service_spec.rb
+++ b/spec/services/system_notes/design_management_service_spec.rb
@@ -134,6 +134,7 @@ RSpec.describe SystemNotes::DesignManagementService do
let(:discussion_note) do
create(:diff_note_on_design, noteable: design, author: author)
end
+
let(:action) { 'designs_discussion_added' }
it_behaves_like 'a system note' do