Sha256: 436014e15b0ae99bf555a56a46e8bd1e0a455c7380f40b1ca98d733aa641a4c5
Contents?: true
Size: 699 Bytes
Versions: 8
Compression:
Stored size: 699 Bytes
Contents
require 'spec_helper' require 'timeout' describe "fedora_solr_sync_issues" do before :all do class ParentThing < ActiveFedora::Base has_many :things, :class_name=>'ChildThing', :property=>:is_part_of end class ChildThing < ActiveFedora::Base belongs_to :parent, :class_name=>'ParentThing', :property=>:is_part_of end end after :all do Object.send(:remove_const, :ChildThing) Object.send(:remove_const, :ParentThing) end let(:parent) { ParentThing.create } subject { ChildThing.create :parent => parent } it "should not go into an infinite loop" do subject.inner_object.delete parent.reload expect(parent.things).to eq([]) end end
Version data entries
8 entries across 8 versions & 1 rubygems