mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Improve filter products tag rule specs' performance
This commit is contained in:
@@ -8,7 +8,7 @@ FactoryBot.define do
|
||||
end
|
||||
|
||||
factory :filter_products_tag_rule, class: TagRule::FilterProducts do
|
||||
enterprise { FactoryBot.create :distributor_enterprise }
|
||||
enterprise factory: :distributor_enterprise
|
||||
end
|
||||
|
||||
factory :filter_payment_methods_tag_rule, class: TagRule::FilterPaymentMethods do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe TagRule::FilterProducts, type: :model do
|
||||
let!(:tag_rule) { create(:filter_products_tag_rule) }
|
||||
let!(:tag_rule) { build_stubbed(:filter_products_tag_rule) }
|
||||
|
||||
describe "determining whether tags match for a given variant" do
|
||||
context "when the variant is nil" do
|
||||
|
||||
Reference in New Issue
Block a user