mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-10 23:07:47 +00:00
Improve filter payment methods tag rule specs' performance
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user