debian-mirror-gitlab/spec/factories/incident_management/issuable_escalation_statuses.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
758 B
Ruby
Raw Normal View History

2021-10-27 15:23:28 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :incident_management_issuable_escalation_status, class: 'IncidentManagement::IssuableEscalationStatus' do
2022-03-02 08:16:31 +05:30
association :issue, factory: :incident
2021-10-27 15:23:28 +05:30
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