Improve filter products tag rule specs' performance

This commit is contained in:
Arun Kumar Mohan
2020-09-22 01:15:42 -05:00
parent e109ed6be7
commit bb38523767
2 changed files with 2 additions and 2 deletions

View File

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

View File

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