2019-07-25 01:11:48 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-12-13 19:13:44 -05:00
|
|
|
FactoryBot.define do
|
2020-01-09 13:07:52 -05:00
|
|
|
factory :ci_runner_project, class: 'Ci::RunnerProject' do
|
2017-08-02 15:55:11 -04:00
|
|
|
project
|
2021-10-12 05:09:35 -04:00
|
|
|
|
|
|
|
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-08-25 21:42:46 -04:00
|
|
|
end
|
|
|
|
end
|