mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Check product image url is present on supplied product endpoint
This commit is contained in:
committed by
David Cook
parent
12c6257a0f
commit
7987967824
@@ -21,7 +21,7 @@ describe "Enterprises", type: :request, swagger_doc: "dfc.yaml", rswag_autodoc:
|
||||
end
|
||||
let!(:product) {
|
||||
create(
|
||||
:base_product,
|
||||
:product_with_image,
|
||||
id: 90_000, supplier: enterprise, name: "Apple", description: "Round",
|
||||
variants: [variant],
|
||||
)
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
|
||||
require_relative "../swagger_helper"
|
||||
|
||||
describe "SuppliedProducts", type: :request, swagger_doc: "dfc.yaml",
|
||||
rswag_autodoc: true do
|
||||
describe "SuppliedProducts", type: :request, swagger_doc: "dfc.yaml", rswag_autodoc: true do
|
||||
let!(:user) { create(:oidc_user) }
|
||||
let!(:enterprise) { create(:distributor_enterprise, id: 10_000, owner: user) }
|
||||
let!(:product) {
|
||||
create(
|
||||
:base_product,
|
||||
:product_with_image,
|
||||
id: 90_000,
|
||||
supplier: enterprise, name: "Pesto", description: "Basil Pesto",
|
||||
variants: [variant],
|
||||
@@ -146,6 +145,7 @@ describe "SuppliedProducts", type: :request, swagger_doc: "dfc.yaml",
|
||||
run_test! do
|
||||
expect(response.body).to include variant.name
|
||||
expect(json_response["ofn:spree_product_id"]).to eq 90_000
|
||||
expect(json_response["ofn:image"]).to include("logo-white.png")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user