Sha256: f4ec521e43663f16c3d37692ae971d02449e43c5a798c596ded15003efed3dc6
Contents?: true
Size: 700 Bytes
Versions: 28
Compression:
Stored size: 700 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 } customer_item_alias { Faker::Alphanumeric.alpha(number: 10) } quantity { 1 } price { 1.5 } total_price { quantity * price } delivery_date { Date.current } canceled { false } use_alias { 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
28 entries across 28 versions & 1 rubygems