Fix rubocop warnings

This commit is contained in:
Matt-Yorkley
2023-09-05 15:37:08 +01:00
committed by Gaetan Craig-Riou
parent a55931c081
commit d959ee2358

View File

@@ -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