Improve filter payment methods tag rule specs' performance

This commit is contained in:
Arun Kumar Mohan
2020-09-22 01:12:46 -05:00
parent 780f31f98e
commit e109ed6be7
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ FactoryBot.define do
end
factory :filter_payment_methods_tag_rule, class: TagRule::FilterPaymentMethods do
enterprise { FactoryBot.create :distributor_enterprise }
enterprise factory: :distributor_enterprise
end
factory :tag_rule, class: TagRule::DiscountOrder do

View File

@@ -1,7 +1,7 @@
require 'spec_helper'
describe TagRule::FilterPaymentMethods, type: :model do
let!(:tag_rule) { create(:filter_payment_methods_tag_rule) }
let!(:tag_rule) { build_stubbed(:filter_payment_methods_tag_rule) }
describe "determining whether tags match for a given payment method" do
context "when the payment method is nil" do