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

runner_namespaces.rb « ci « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e3cebed789b873af101baed1edc06acd923cdc45 (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_namespace, class: 'Ci::RunnerNamespace' do
    group

    after(:build) do |runner_namespace, evaluator|
      unless runner_namespace.runner.present?
        runner_namespace.runner = build(
          :ci_runner, :group, runner_namespaces: [runner_namespace]
        )
      end
    end
  end
end