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

Version Path
comee_core-0.2.93 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.92 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.91 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.90 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.89 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.88 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.87 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.86 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.85 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.84 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.83 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.82 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.81 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.80 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.78 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.77 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.76 spec/factories/comee/core/customer_order_items.rb
comee_core-0.2.75 spec/factories/comee/core/customer_order_items.rb