Commit ffc1e3ae authored by Alper Akgun's avatar Alper Akgun

Merge branch '273398-BuildNeed-belongs_to-Processable' into 'master'

Change class name of BuildNeed-build association

See merge request gitlab-org/gitlab!50429
parents 298ebf6f ca8fda1c
......@@ -6,7 +6,7 @@ module Ci
include BulkInsertSafe
belongs_to :build, class_name: "Ci::Build", foreign_key: :build_id, inverse_of: :needs
belongs_to :build, class_name: "Ci::Processable", foreign_key: :build_id, inverse_of: :needs
validates :build, presence: true
validates :name, presence: true, length: { maximum: 128 }
......
......@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe Ci::BuildNeed, model: true do
let(:build_need) { build(:ci_build_need) }
it { is_expected.to belong_to(:build) }
it { is_expected.to belong_to(:build).class_name('Ci::Processable') }
it { is_expected.to validate_presence_of(:build) }
it { is_expected.to validate_presence_of(:name) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment