2020-05-11 11:09:37 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :resource_state_event do
|
2020-10-20 17:09:41 -04:00
|
|
|
issue { merge_request.nil? ? association(:issue) : nil }
|
2020-05-11 11:09:37 -04:00
|
|
|
merge_request { nil }
|
|
|
|
state { :opened }
|
2020-10-20 17:09:41 -04:00
|
|
|
user { issue&.author || merge_request&.author || association(:user) }
|
2020-05-11 11:09:37 -04:00
|
|
|
end
|
|
|
|
end
|