spec/lib/collectible_spec.rb in hydra-collections-3.0.0.beta2 vs spec/lib/collectible_spec.rb in hydra-collections-3.0.0.beta3
- old
+ new
@@ -13,19 +13,19 @@
it "should allow adding and removing" do
@collectible.save
@collection1.members << @collectible
@collection1.save
@collectible.collections << @collection2
- reloaded = CollectibleThing.find(@collectible.id)
- expect(@collection2.reload.members).to eq [@collectible]
- expect(reloaded.collections).to eq [@collection1, @collection2]
+ reloaded = CollectibleThing.find(@collectible.pid)
+ expect(@collection2.reload.members).to eq([@collectible])
+ expect(reloaded.collections).to eq([@collection1, @collection2])
end
end
- describe "index_collection_ids" do
- it "should add ids for all associated collections" do
+ describe "index_collection_pids" do
+ it "should add pids for all associated collections" do
@collectible.save
@collectible.collections << @collection1
@collectible.collections << @collection2
- expect(@collectible.index_collection_ids["collection_sim"]).to eq [@collection1.id, @collection2.id]
+ expect(@collectible.index_collection_pids["collection_sim"]).to eq([@collection1.pid, @collection2.pid])
end
end
-end
+end
\ No newline at end of file