2019-10-16 05:07:51 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
2020-01-09 13:07:52 -05:00
|
|
|
factory :ci_sources_pipeline, class: 'Ci::Sources::Pipeline' do
|
2019-10-16 05:07:51 -04:00
|
|
|
after(:build) do |source|
|
|
|
|
source.project ||= source.pipeline.project
|
|
|
|
source.source_pipeline ||= source.source_job.pipeline
|
|
|
|
source.source_project ||= source.source_pipeline.project
|
|
|
|
end
|
|
|
|
|
|
|
|
source_job factory: :ci_build
|
|
|
|
|
|
|
|
pipeline factory: :ci_empty_pipeline
|
|
|
|
end
|
|
|
|
end
|