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

16 lines
361 B
Ruby
Raw Permalink Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
FactoryBot.define do
2020-03-13 15:44:24 +05:30
factory :ci_runner_project, class: 'Ci::RunnerProject' do
2017-09-10 17:25:29 +05:30
project
2021-11-18 22:05:49 +05:30
after(:build) do |runner_project, evaluator|
unless runner_project.runner.present?
runner_project.runner = build(
:ci_runner, :project, runner_projects: [runner_project]
)
end
end
2015-09-25 12:07:36 +05:30
end
end