Sha256: 6cc9a902d91cb06369a9fcdc73f2a61b591d8affd69a76fa2f70dae11b6e87ed
Contents?: true
Size: 551 Bytes
Versions: 14
Compression:
Stored size: 551 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 => self.name, :foreign_key => :parent_id belongs_to :parent, :class_name => self.name end expect(RailsAdmin.config(MongoTree).fields.find{ |f| f.name == :parent }.type ).to eq :belongs_to_association end end end
Version data entries
14 entries across 14 versions & 2 rubygems