Sha256: d57ad7a68484229c183188fe9ba5d3421e109712ec25e327aa889075142ff01c
Contents?: true
Size: 441 Bytes
Versions: 8
Compression:
Stored size: 441 Bytes
Contents
FactoryBot.define do factory :product, class: "Comee::Core::Product" do transient do root { Comee::Core::Product.where(code: "ROOT", name: "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 } leaf { true } ancestry { root.id.to_s } preferred_units { [] } end end
Version data entries
8 entries across 8 versions & 1 rubygems