Switch to comparing product type semanticId

Currently it's not possibel to compare two
`DataFoodConsortium::Connector::SKOSConcept` or
two `VirtualAssembly::Semantizer::SemanticObject with` `==`.

Related to : https://github.com/assemblee-virtuelle/semantizer-ruby/pull/2/files
This commit is contained in:
Gaetan Craig-Riou
2024-01-22 11:40:50 +11:00
parent 96a010033d
commit 36b3b3c989

View File

@@ -11,7 +11,7 @@ describe DfcProductTypeFactory do
it "assigns a top level product type" do
drink = DfcLoader.connector.PRODUCT_TYPES.DRINK
expect(described_class.for(dfc_id)).to eq drink
expect(described_class.for(dfc_id).semanticId).to eq drink.semanticId
end
context "with second level product type" do
@@ -22,7 +22,7 @@ describe DfcProductTypeFactory do
it "assigns a second level product type" do
soft_drink = DfcLoader.connector.PRODUCT_TYPES.DRINK.SOFT_DRINK
expect(described_class.for(dfc_id)).to eq soft_drink
expect(described_class.for(dfc_id).semanticId).to eq soft_drink.semanticId
end
end
@@ -34,7 +34,7 @@ describe DfcProductTypeFactory do
it "assigns a leaf level product type" do
lemonade = DfcLoader.connector.PRODUCT_TYPES.DRINK.SOFT_DRINK.LEMONADE
expect(described_class.for(dfc_id)).to eq lemonade
expect(described_class.for(dfc_id).semanticId).to eq lemonade.semanticId
end
end