diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /spec/services/issues/close_service_spec.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) | |
download | gitlab-ce-a7b3560714b4d9cc4ab32dffcd1f74a284b93580.tar.gz |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'spec/services/issues/close_service_spec.rb')
-rw-r--r-- | spec/services/issues/close_service_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/services/issues/close_service_spec.rb b/spec/services/issues/close_service_spec.rb index 158f9dec83e..1f6118e9fcc 100644 --- a/spec/services/issues/close_service_spec.rb +++ b/spec/services/issues/close_service_spec.rb @@ -118,7 +118,7 @@ RSpec.describe Issues::CloseService do expect { service.execute(issue) }.to change { issue.notes.count }.by(1) new_note = issue.notes.last - expect(new_note.note).to eq('changed the status to **Resolved** by closing the incident') + expect(new_note.note).to eq('changed the incident status to **Resolved** by closing the incident') expect(new_note.author).to eq(user) end @@ -334,8 +334,12 @@ RSpec.describe Issues::CloseService do let!(:alert) { create(:alert_management_alert, issue: issue, project: project) } it 'resolves an alert and sends a system note' do - expect_next_instance_of(SystemNotes::AlertManagementService) do |notes_service| - expect(notes_service).to receive(:closed_alert_issue).with(issue) + expect_any_instance_of(SystemNoteService) do |notes_service| + expect(notes_service).to receive(:change_alert_status).with( + alert, + current_user, + " by closing issue #{issue.to_reference(project)}" + ) end close_issue |