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

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

FactoryBot.define do
  factory :ci_runner_project, class: 'Ci::RunnerProject' do
    project

    after(:build) do |runner_project, evaluator|
      unless runner_project.runner.present?
        runner_project.runner = build(
          :ci_runner, :project, runner_projects: [runner_project]
        )
      end
    end
  end
end