debian-mirror-gitlab/spec/factories/ci/runner_namespaces.rb

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

16 lines
371 B
Ruby
Raw Normal View History

2021-06-08 01:23:25 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :ci_runner_namespace, class: 'Ci::RunnerNamespace' do
group
2021-12-11 22:18:48 +05:30
after(:build) do |runner_namespace, evaluator|
unless runner_namespace.runner.present?
runner_namespace.runner = build(
:ci_runner, :group, runner_namespaces: [runner_namespace]
)
end
end
2021-06-08 01:23:25 +05:30
end
end