From 5d4ef5b52cf829be4eb8ee974c006995d2bbee14 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Wed, 19 Jul 2023 14:28:26 +0200 Subject: [PATCH] To test the search by category, we need to use set `primary_taxon` attr --- spec/system/admin/products_v3/products_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/admin/products_v3/products_spec.rb b/spec/system/admin/products_v3/products_spec.rb index 6ad07156d9..c83e073fd9 100644 --- a/spec/system/admin/products_v3/products_spec.rb +++ b/spec/system/admin/products_v3/products_spec.rb @@ -18,7 +18,7 @@ describe 'As an admin, I can see the new product page' do let!(:product_by_supplier) { create(:simple_product, supplier: producer) } # create a product with a category that can be searched let!(:product_by_category) { - create(:simple_product, taxons: [create(:taxon, name: "Category 1")]) + create(:simple_product, primary_taxon: create(:taxon, name: "Category 1")) } before do