diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /spec/factories/issues.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'spec/factories/issues.rb')
-rw-r--r-- | spec/factories/issues.rb | 9 |
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 |