Open elrayle opened 9 years ago
As an example, a problem with multiple objects appearing in a collection was hidden by not saving and reloading.
This passes...
it 'should allow objects to repeat' do Hydra::PCDM::AddObjectToCollection.call( subject, object1 ) Hydra::PCDM::AddObjectToCollection.call( subject, object2 ) Hydra::PCDM::AddObjectToCollection.call( subject, object1 ) expect( Hydra::PCDM::GetObjectsFromCollection.call( subject ) ).to eq [object1,object2,object1] end
This fails...
it 'should allow objects to repeat' do Hydra::PCDM::AddObjectToCollection.call( subject, object1 ) Hydra::PCDM::AddObjectToCollection.call( subject, object2 ) Hydra::PCDM::AddObjectToCollection.call( subject, object1 ) subject.save expect( Hydra::PCDM::GetObjectsFromCollection.call( subject.reload ) ).to eq [object1,object2,object1] end
As an example, a problem with multiple objects appearing in a collection was hidden by not saving and reloading.
This passes...
This fails...