diff options
Diffstat (limited to 'spec/factories/resource_milestone_events.rb')
-rw-r--r-- | spec/factories/resource_milestone_events.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/resource_milestone_events.rb b/spec/factories/resource_milestone_events.rb new file mode 100644 index 00000000000..a3944e013da --- /dev/null +++ b/spec/factories/resource_milestone_events.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :resource_milestone_event do + issue { merge_request.nil? ? association(:issue) : nil } + merge_request { nil } + milestone + action { :add } + state { :opened } + user { issue&.author || merge_request&.author || association(:user) } + end +end |