debian-mirror-gitlab/spec/factories/resource_label_events.rb
2021-01-29 00:20:46 +05:30

13 lines
285 B
Ruby

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