Sha256: 4e8128c0327de76d4d1be536f623c4dd55eed839be63c19defbe4a314e2c2b38
Contents?: true
Size: 749 Bytes
Versions: 85
Compression:
Stored size: 749 Bytes
Contents
FactoryBot.define do factory :product, class: "Comee::Core::Product" do transient do root { Comee::Core::Product.where(code: "ROOT", name: "Products", customs_description: "Products", leaf: false).first_or_create } end sequence(:code) { |n| "#{Faker::Alphanumeric.unique.alpha(number: 6)}-#{n}" } name { Faker::Name.name } description { Faker::Lorem.sentence } customs_description { Faker::Lorem.sentence } leaf { true } ancestry { root.id.to_s } preferred_units { [] } weight { 10 } weight_unit factory: :unit dimensions { "2cm x 3cm x 1cm" } hs_code { Faker::Alphanumeric.alpha(number: 10) } hs_description { Faker::Lorem.sentence } source factory: :fulfillment_center end end
Version data entries
85 entries across 85 versions & 1 rubygems