wblog/spec/factories/comments.rb

15 lines
300 B
Ruby

FactoryBot.define do
factory :comment do
content { 'content' * 10 }
name { 'commentor' }
email { 'tester@xx.com' }
association :post
end
factory :comment_no_post, class: Comment do
content { 'content' * 10 }
name { 'commentor' }
email { 'tester@xx.com' }
end
end