Sha256: e8755769891ba72ad8e9c501eb87d57c1d5a0a794cb31937e553c3e39633f0d4

Contents?: true

Size: 459 Bytes

Versions: 4

Compression:

Stored size: 459 Bytes

Contents

FactoryGirl.define do
  factory :subscription_line_item, class: 'SolidusSubscriptions::LineItem' do
    subscribable_id { create(:variant, subscribable: true).id }
    quantity 1
    interval_length 1
    interval_units :month

    association :spree_line_item, factory: :line_item

    trait :with_subscription do
      transient do
        subscription_traits []
      end

      subscription { build :subscription, *subscription_traits }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_subscriptions-alpha-0.0.5 lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb
solidus_subscriptions-alpha-0.0.3 lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb
solidus_subscriptions-alpha-0.0.2 lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb
solidus_subscriptions-alpha-0.0.1 lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb