debian-mirror-gitlab/spec/factories/resource_state_events.rb
2023-03-04 22:38:38 +05:30

10 lines
280 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :resource_state_event do
issue { merge_request.nil? ? association(:issue) : nil }
merge_request { nil }
state { :opened }
user { issue&.author || merge_request&.author || association(:user) }
end
end