diff options
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/product.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/factories/product.rb b/spec/factories/product.rb index abdf4bc..fb64d0d 100644 --- a/spec/factories/product.rb +++ b/spec/factories/product.rb @@ -3,13 +3,13 @@ FactoryBot.define do factory :product, class: 'Product' do name { Faker::Commerce.product_name } - unitary_price { rand(1000.0) } - bulk_price { rand(1000.0) } - available_quantity { rand(1000) } + unitary_price { rand(1.0..1000.0) } + bulk_price { rand(1.0..1000.0) } + available_quantity { rand(1..1000) } company { create(:company) } categories do c = [] - (0..rand(5)).each do + (1..rand(5)).each do c.push(Faker::Commerce.department(max: 1)) end c |