gitlab-org--gitlab-foss/spec/factories/resource_label_events.rb

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

14 lines
285 B
Ruby
Raw Normal View History

2018-08-01 04:58:49 -04:00
# frozen_string_literal: true
FactoryBot.define do
factory :resource_label_event do
action { :add }
2018-08-01 04:58:49 -04:00
label
user { issuable&.author || association(:user) }
after(:build) do |event, evaluator|
event.issue = create(:issue) unless event.issuable
end
2018-08-01 04:58:49 -04:00
end
end