2019-12-21 20:55:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
2020-03-09 13:42:32 +05:30
|
|
|
factory :ci_sources_pipeline, class: 'Ci::Sources::Pipeline' do
|
2019-12-21 20:55:43 +05:30
|
|
|
after(:build) do |source|
|
|
|
|
source.project ||= source.pipeline.project
|
2023-03-04 22:38:38 +05:30
|
|
|
source.source_pipeline ||= source.source_job&.pipeline
|
|
|
|
source.source_project ||= source.source_pipeline&.project
|
2019-12-21 20:55:43 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
source_job factory: :ci_build
|
|
|
|
|
|
|
|
pipeline factory: :ci_empty_pipeline
|
|
|
|
end
|
|
|
|
end
|