2023-10-28 14:06:03 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
2023-11-08 20:33:49 +01:00
|
|
|
factory :order, class: Rex::Book::Order do
|
2023-10-28 14:06:03 +02:00
|
|
|
sequence(:id) { |i| i }
|
|
|
|
sequence(:user_id) { |i| i }
|
|
|
|
sequence(:is_buy) { |i| (i % 2).zero? }
|
|
|
|
sequence(:price) { 100 }
|
2023-10-29 00:03:25 +02:00
|
|
|
sequence(:quantity) { 20 }
|
|
|
|
remaining_quantity { quantity }
|
2023-10-28 14:06:03 +02:00
|
|
|
end
|
|
|
|
end
|