From 753bf8499ba5d8815db8d08a1dcf69caa20660cf Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Sat, 1 Apr 2023 12:00:33 -0600 Subject: Mejora estructura del proyecto --- spec/factories/product_review.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 spec/factories/product_review.rb (limited to 'spec/factories') diff --git a/spec/factories/product_review.rb b/spec/factories/product_review.rb new file mode 100644 index 0000000..b9778bd --- /dev/null +++ b/spec/factories/product_review.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :product_review, class: 'ProductReview' do + user_account { create(:user_account) } + product { create(:product) } + review { Faker::Lorem.paragraphs } + rating { rand(1..5) } + end +end -- cgit v1.2.3