Sha256: 4c6b634bd71bb8e3ca6fbf787d2203549626fe49ad4d500600a89448fa6eb35c

Contents?: true

Size: 288 Bytes

Versions: 24

Compression:

Stored size: 288 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :line_item, class: 'Spree::LineItem' do
    quantity { 1 }
    price { BigDecimal('10.00') }
    order
    transient do
      product { nil }
    end
    variant do
      (product || create(:product)).master
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
solidus_core-4.4.2 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.4.1 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.4.0 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.3.4 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.2.4 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.1.5 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.3.3 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.3.2 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.1.4 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.3.1 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.3.0 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.2.3 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.1.3 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.0.4 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.0.3 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.1.2 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.2.2 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.2.1 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.2.0 lib/spree/testing_support/factories/line_item_factory.rb
solidus_core-4.1.1 lib/spree/testing_support/factories/line_item_factory.rb