Sha256: 56c82668e4eaa4dae6e7921463f9958e68b893f8f696cd2fa059c0fcffc98f90
Contents?: true
Size: 501 Bytes
Versions: 15
Compression:
Stored size: 501 Bytes
Contents
FactoryBot.define do factory :customer_order_item, class: "Comee::Core::CustomerOrderItem" do customer_order product unit customer_item_no { Faker::Alphanumeric.alpha(number: 10) } 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
15 entries across 15 versions & 1 rubygems