Sha256: c16fdf17ff97e20faf8bbe204dcfd17ec5d8d86d8d788f670bafb0a567ab9287
Contents?: true
Size: 531 Bytes
Versions: 4
Compression:
Stored size: 531 Bytes
Contents
require 'spec_helper' describe RailsAdmin::Config::Fields, mongoid: true do describe '.factory for self.referentials belongs_to' do it 'associates belongs_to _id foreign_key to a belongs_to association' do class MongoTree include Mongoid::Document has_many :children, class_name: name, foreign_key: :parent_id belongs_to :parent, class_name: name end expect(RailsAdmin.config(MongoTree).fields.detect { |f| f.name == :parent }.type).to eq :belongs_to_association end end end
Version data entries
4 entries across 4 versions & 1 rubygems