Stabilise flaky spec with unique taxons

The test was creating two "Soft Drinks" taxons and it was random which
one was applied to a new product. Changing one taxon to a different one
removes the ambiguity.
This commit is contained in:
Maikel Linke
2024-08-07 13:50:51 +10:00
parent 706eb737b1
commit fd8973862e

View File

@@ -176,12 +176,12 @@ RSpec.describe SuppliedProductBuilder do
spree_product_id: variant.product.id
)
end
let(:product_type) { DfcLoader.connector.PRODUCT_TYPES.DRINK.SOFT_DRINK }
let(:product_type) { DfcLoader.connector.PRODUCT_TYPES.DRINK.SOFT_DRINK.FRUIT_JUICE }
let!(:new_taxon) {
create(
:taxon,
name: "Soft Drink",
dfc_id: "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#soft-drink"
name: "Fruit Juice",
dfc_id: "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#fruit-juice"
)
}