From 8204ff6e6aa847be16381916c31157f3dee2560a Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sun, 22 May 2022 15:08:25 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- app/models/ci/sources/pipeline.rb | 4 ++-- spec/models/ci/sources/pipeline_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/ci/sources/pipeline.rb b/app/models/ci/sources/pipeline.rb index f78caf710a6..2df504cd3de 100644 --- a/app/models/ci/sources/pipeline.rb +++ b/app/models/ci/sources/pipeline.rb @@ -7,10 +7,10 @@ module Ci self.table_name = "ci_sources_pipelines" - belongs_to :project, class_name: "Project" + belongs_to :project, class_name: "::Project" belongs_to :pipeline, class_name: "Ci::Pipeline", inverse_of: :source_pipeline - belongs_to :source_project, class_name: "Project", foreign_key: :source_project_id + belongs_to :source_project, class_name: "::Project", foreign_key: :source_project_id belongs_to :source_job, class_name: "CommitStatus", foreign_key: :source_job_id belongs_to :source_bridge, class_name: "Ci::Bridge", foreign_key: :source_job_id belongs_to :source_pipeline, class_name: "Ci::Pipeline", foreign_key: :source_pipeline_id diff --git a/spec/models/ci/sources/pipeline_spec.rb b/spec/models/ci/sources/pipeline_spec.rb index 73f7cfa739f..732dd5c3df3 100644 --- a/spec/models/ci/sources/pipeline_spec.rb +++ b/spec/models/ci/sources/pipeline_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Ci::Sources::Pipeline do it { is_expected.to belong_to(:project) } it { is_expected.to belong_to(:pipeline) } - it { is_expected.to belong_to(:source_project) } + it { is_expected.to belong_to(:source_project).class_name('::Project') } it { is_expected.to belong_to(:source_job) } it { is_expected.to belong_to(:source_bridge) } it { is_expected.to belong_to(:source_pipeline) }