debian-mirror-gitlab/spec/factories/resource_milestone_events.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
318 B
Ruby
Raw Normal View History

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