2020-02-19 13:09:10 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :resource_milestone_event do
|
2020-10-20 17:09:41 -04:00
|
|
|
issue { merge_request.nil? ? association(:issue) : nil }
|
2020-02-19 13:09:10 -05:00
|
|
|
merge_request { nil }
|
|
|
|
milestone
|
|
|
|
action { :add }
|
|
|
|
state { :opened }
|
2020-10-20 17:09:41 -04:00
|
|
|
user { issue&.author || merge_request&.author || association(:user) }
|
2020-02-19 13:09:10 -05:00
|
|
|
end
|
|
|
|
end
|