Sha256: e9c8c5db93a254456b9fe0473146fabf940bee8088e02b3122091a317a5986a1
Contents?: true
Size: 640 Bytes
Versions: 52
Compression:
Stored size: 640 Bytes
Contents
# frozen_string_literal: true require 'spree/testing_support/factories/shipment_factory' require 'spree/testing_support/factories/inventory_unit_factory' 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
52 entries across 52 versions & 2 rubygems