mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix rubocop warnings
This commit is contained in:
committed by
Gaetan Craig-Riou
parent
a55931c081
commit
d959ee2358
@@ -35,7 +35,8 @@ describe Api::V0::ProductsController, type: :controller do
|
||||
|
||||
it "gets a single product" do
|
||||
product.create_image!(attachment:)
|
||||
product.variants.create!(unit_value: "1", unit_description: "thing", price: 1, primary_taxon: taxon)
|
||||
product.variants.create!(unit_value: "1", unit_description: "thing", price: 1,
|
||||
primary_taxon: taxon)
|
||||
product.variants.first.images.create!(attachment:)
|
||||
product.set_property("spree", "rocks")
|
||||
|
||||
@@ -267,7 +268,8 @@ describe Api::V0::ProductsController, type: :controller do
|
||||
end
|
||||
|
||||
it "filters results by product category" do
|
||||
api_get :bulk_products, { page: 1, per_page: 15, q: { variants_primary_taxon_id_eq: taxon.id } },
|
||||
api_get :bulk_products,
|
||||
{ page: 1, per_page: 15, q: { variants_primary_taxon_id_eq: taxon.id } },
|
||||
format: :json
|
||||
expect(returned_product_ids).to eq [product3.id, product2.id]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user