2020-04-08 14:13:33 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :resource_milestone_event do
|
2021-01-29 00:20:46 +05:30
|
|
|
issue { merge_request.nil? ? association(:issue) : nil }
|
2020-04-08 14:13:33 +05:30
|
|
|
merge_request { nil }
|
|
|
|
milestone
|
|
|
|
action { :add }
|
|
|
|
state { :opened }
|
2021-01-29 00:20:46 +05:30
|
|
|
user { issue&.author || merge_request&.author || association(:user) }
|
2020-04-08 14:13:33 +05:30
|
|
|
end
|
|
|
|
end
|