diff options
Diffstat (limited to 'spec/factories/incident_management')
-rw-r--r-- | spec/factories/incident_management/issuable_escalation_statuses.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/factories/incident_management/issuable_escalation_statuses.rb b/spec/factories/incident_management/issuable_escalation_statuses.rb new file mode 100644 index 00000000000..54d0887f386 --- /dev/null +++ b/spec/factories/incident_management/issuable_escalation_statuses.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :incident_management_issuable_escalation_status, class: 'IncidentManagement::IssuableEscalationStatus' do + issue + triggered + + trait :triggered do + status { ::IncidentManagement::IssuableEscalationStatus.status_value(:triggered) } + end + + trait :acknowledged do + status { ::IncidentManagement::IssuableEscalationStatus.status_value(:acknowledged) } + end + + trait :resolved do + status { ::IncidentManagement::IssuableEscalationStatus.status_value(:resolved) } + resolved_at { Time.current } + end + + trait :ignored do + status { ::IncidentManagement::IssuableEscalationStatus.status_value(:ignored) } + end + end +end |