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/factories/issues.rb')
-rw-r--r--spec/factories/issues.rb9
1 files changed, 9 insertions, 0 deletions
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