Sha256: b41245d4e68641b6dea14d80b39c3e2338e1e21090526a764fdd4885541d8f72

Contents?: true

Size: 420 Bytes

Versions: 8

Compression:

Stored size: 420 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'
require_relative '../../mongoid/association/referenced/has_one_models'

describe 'belongs_to associations' do
  context 'referencing top level classes when source class is namespaced' do
    let(:college) { HomCollege.create! }
    let(:child) { HomAccreditation::Child.new(hom_college: college) }

    it 'works' do
      expect(child).to be_valid
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mongoid-7.5.4 spec/integration/associations/belongs_to_spec.rb
mongoid-7.5.3 spec/integration/associations/belongs_to_spec.rb
mongoid-7.5.2 spec/integration/associations/belongs_to_spec.rb
mongoid-7.5.1 spec/integration/associations/belongs_to_spec.rb
mongoid-7.4.3 spec/integration/associations/belongs_to_spec.rb
mongoid-7.5.0 spec/integration/associations/belongs_to_spec.rb
mongoid-7.4.1 spec/integration/associations/belongs_to_spec.rb
mongoid-7.4.0 spec/integration/associations/belongs_to_spec.rb