Sha256: dbcc72728d687967fcd9fb98b6dc901a70e6275740cd322cae2eb2691aa39648
Contents?: true
Size: 610 Bytes
Versions: 58
Compression:
Stored size: 610 Bytes
Contents
FactoryBot.define do factory :customer_order_item, class: "Comee::Core::CustomerOrderItem" do serial_no { Faker::Number.within(range: 1..10) } customer_order product unit customer_item_no { Faker::Alphanumeric.alpha(number: 10) } customer_item_description { Faker::Lorem.sentence } quantity { 1 } price { 1.5 } total_price { quantity * price } delivery_date { Date.current } canceled { false } trait :with_inventory do after(:create) do |item| create(:inventory, product: item.product, quantity: item.quantity + 100) end end end end
Version data entries
58 entries across 58 versions & 1 rubygems