Commit ca8fda1c authored by Furkan Ayhan's avatar Furkan Ayhan

Change class name of BuildNeed-build association

It should be Ci::Processable because we already use it with
Ci::Build and Ci::Bridge.
parent f589d1a8
......@@ -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