Welcome to mirror list, hosted at ThFree Co, Russian Federation.

resource_label_events.rb « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 35c732fed0fc8eb666a46d3bcbf3804067b2cccf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

FactoryBot.define do
  factory :resource_label_event do
    action { :add }
    label
    user { issuable&.author || association(:user) }

    after(:build) do |event, evaluator|
      event.issue = create(:issue) unless event.issuable
    end
  end
end