diff options
author | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-06-17 13:32:12 +0200 |
---|---|---|
committer | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-06-17 13:51:24 +0200 |
commit | 501cb584beb079bc9e4f967b940c1d3e7ea9c01f (patch) | |
tree | 2fa1d555e724903a997b539e77f4e417e98e3ae5 /lib/solidus_subscriptions/testing_support | |
parent | 1c5c52fb90cb8080f4cd8881d2816ee3a08d2306 (diff) |
Create :with_shipping_address and :with_billing_address traits
Diffstat (limited to 'lib/solidus_subscriptions/testing_support')
-rw-r--r-- | lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb b/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb index cdbea1e..87fe75d 100644 --- a/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb +++ b/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb @@ -20,10 +20,14 @@ FactoryBot.define do line_items { build_list :subscription_line_item, 1, *line_item_traits } end - trait :with_address do + trait :with_shipping_address do association :shipping_address, factory: :address end + trait :with_billing_address do + association :billing_address, factory: :address + end + trait :actionable do with_line_item actionable_date { Time.zone.now.yesterday.beginning_of_minute } |