mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user