Sha256: eeaf89947f26fcbb612f1949bf35e5984bba8d61bda2cb6bc7aa549fed20612b

Contents?: true

Size: 384 Bytes

Versions: 7

Compression:

Stored size: 384 Bytes

Contents

# frozen_string_literal: true

FactoryBot.modify do
  factory :line_item do
    trait :with_subscription_line_items do
      transient do
        n_subscription_line_items { 1 }
      end

      subscription_line_items do
        Array.new(n_subscription_line_items) do
          association :subscription_line_item, spree_line_item: @instance
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
solidus_subscriptions-2.0.2 lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
solidus_subscriptions-2.0.1 lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
solidus_subscriptions-2.0.0 lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
solidus_subscriptions-1.1.0 lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
solidus_subscriptions-1.0.1 lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
solidus_subscriptions-1.0.0 lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
solidus_subscriptions-1.0.0.rc1 lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb