summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-03-22 17:41:07 -0600
committerHombreLaser <sebastian-440@live.com>2023-03-22 17:41:07 -0600
commitdbb97dbec33ee078f1ba4cc0595f40a951c49648 (patch)
treecd97cd9efd140ce83b642e3430c3dd51a6b47a60 /spec/factories
parent5868c1230bdfde7fa10d498a12e214df2722415c (diff)
Añade specs de ProductsController
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/product.rb8
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