summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions/testing_support
diff options
context:
space:
mode:
Diffstat (limited to 'lib/solidus_subscriptions/testing_support')
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb b/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
index 222f9ef..036b4c2 100644
--- a/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
@@ -5,8 +5,9 @@ FactoryGirl.define do
interval_units :month
user do
- ccs = build_list(:credit_card, 1, gateway_customer_profile_id: 'BGS-123', default: true)
- build :user, :subscription_user, credit_cards: ccs
+ create(:user, :subscription_user).tap do |user|
+ create(:credit_card, gateway_customer_profile_id: 'BGS-123', user: user, default: true)
+ end
end
trait :with_line_item do