diff options
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/product_review.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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 |