From dbb97dbec33ee078f1ba4cc0595f40a951c49648 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Wed, 22 Mar 2023 17:41:07 -0600 Subject: AƱade specs de ProductsController MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/factories/product.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/factories') 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 -- cgit v1.2.3