From a7b3560714b4d9cc4ab32dffcd1f74a284b93580 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 18 Feb 2022 09:45:46 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-8-stable-ee --- spec/factories/issues.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/factories/issues.rb') diff --git a/spec/factories/issues.rb b/spec/factories/issues.rb index 8b53732a3c1..26c858665a8 100644 --- a/spec/factories/issues.rb +++ b/spec/factories/issues.rb @@ -61,6 +61,15 @@ FactoryBot.define do factory :incident do issue_type { :incident } association :work_item_type, :default, :incident + + # An escalation status record is created for all incidents + # in app code. This is a trait to avoid creating escalation + # status records in specs which do not need them. + trait :with_escalation_status do + after(:create) do |incident| + create(:incident_management_issuable_escalation_status, issue: incident) + end + end end end end -- cgit v1.2.3