Sha256: 652d9786c2d407816b0d70529e239fe3a282ea1cb8066b09bbd967849b91e45d

Contents?: true

Size: 571 Bytes

Versions: 1

Compression:

Stored size: 571 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :physical_shipment, class: "Physical::Shipment" do
    origin { FactoryBot.build(:physical_location) }
    destination { FactoryBot.build(:physical_location) }
    pallets { build_list(:physical_pallet, 1) } # deprecated, will be removed
    packages { build_list(:physical_package, 2) }
    service_code { "usps_priority_mail" }
    initialize_with { new(**attributes) }

    trait :freight do
      structures { build_list(:physical_structure, 1) }
      service_code { "tforce_freight" }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
physical-0.5.0 lib/physical/spec_support/factories/shipment_factory.rb