mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Update test to check for Product Type
This commit is contained in:
@@ -11,9 +11,11 @@ describe "SuppliedProducts", type: :request, swagger_doc: "dfc.yaml", rswag_auto
|
||||
id: 90_000,
|
||||
supplier: enterprise, name: "Pesto", description: "Basil Pesto",
|
||||
variants: [variant],
|
||||
primary_taxon: taxon
|
||||
)
|
||||
}
|
||||
let(:variant) { build(:base_variant, id: 10_001, unit_value: 1) }
|
||||
let(:taxon) { build(:taxon, name: "Local grocery store", dfc_name: "local_grocery_store") }
|
||||
|
||||
before { login_as user }
|
||||
|
||||
@@ -146,6 +148,7 @@ describe "SuppliedProducts", type: :request, swagger_doc: "dfc.yaml", rswag_auto
|
||||
run_test! do
|
||||
expect(response.body).to include variant.name
|
||||
expect(json_response["ofn:spree_product_id"]).to eq 90_000
|
||||
expect(json_response["dfc-b:hasType"]).to include("Local grocery store")
|
||||
expect(json_response["ofn:image"]).to include("logo-white.png")
|
||||
|
||||
# Insert static value to keep documentation deterministic:
|
||||
|
||||
Reference in New Issue
Block a user