To test the search by category, we need to use set primary_taxon attr

This commit is contained in:
Jean-Baptiste Bellet
2023-07-19 14:28:26 +02:00
parent bada2ef4a7
commit 5d4ef5b52c

View File

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