debian-mirror-gitlab/spec/factories/ci/sources/pipelines.rb
2023-03-05 14:24:40 +05:30

15 lines
417 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :ci_sources_pipeline, class: 'Ci::Sources::Pipeline' do
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