Sha256: 073127121f13a5a78ae5f0bba80f90e89f277b30164890c411c6dab5ae40a06f
Contents?: true
Size: 810 Bytes
Versions: 56
Compression:
Stored size: 810 Bytes
Contents
# frozen_string_literal: true require 'spree/testing_support/factory_bot' Spree::TestingSupport::FactoryBot.when_cherry_picked do Spree::TestingSupport::FactoryBot.deprecate_cherry_picking require 'spree/testing_support/factories/shipment_factory' require 'spree/testing_support/factories/inventory_unit_factory' end FactoryBot.define do factory :carton, class: 'Spree::Carton' do address stock_location shipping_method shipped_at { Time.current } inventory_units do [ build( :inventory_unit, # ensure the shipment uses the same stock location as the carton shipment: build( :shipment, stock_location: stock_location, shipping_method: shipping_method ) ) ] end end end
Version data entries
56 entries across 56 versions & 1 rubygems