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:
Diffstat (limited to 'spec/services/issues/reopen_service_spec.rb')
-rw-r--r--spec/services/issues/reopen_service_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/services/issues/reopen_service_spec.rb b/spec/services/issues/reopen_service_spec.rb
index f7416203259..ffe74cca9cf 100644
--- a/spec/services/issues/reopen_service_spec.rb
+++ b/spec/services/issues/reopen_service_spec.rb
@@ -44,7 +44,7 @@ RSpec.describe Issues::ReopenService do
end
it 'deletes milestone issue counters cache' do
- issue.update(milestone: create(:milestone, project: project))
+ issue.update!(milestone: create(:milestone, project: project))
expect_next_instance_of(Milestones::ClosedIssuesCountService, issue.milestone) do |service|
expect(service).to receive(:delete_cache).and_call_original
@@ -53,6 +53,15 @@ RSpec.describe Issues::ReopenService do
described_class.new(project, user).execute(issue)
end
+ context 'issue is incident type' do
+ let(:issue) { create(:incident, :closed, project: project) }
+ let(:current_user) { user }
+
+ subject { described_class.new(project, user).execute(issue) }
+
+ it_behaves_like 'an incident management tracked event', :incident_management_incident_reopened
+ end
+
context 'when issue is not confidential' do
it 'executes issue hooks' do
expect(project).to receive(:execute_hooks).with(an_instance_of(Hash), :issue_hooks)