docbrown/spec/factories/comments.rb
rhymes ac7ef66726 Update Faker to 2.1.0 (#3652)
* Upgrade Faker to 2.1.0

* Transition Faker calls to the new API
2019-08-07 15:59:23 -04:00

11 lines
298 B
Ruby

FactoryBot.define do
factory :comment do
user
body_markdown { Faker::Hipster.paragraph(sentence_count: 1) }
commentable_id { rand(1000) }
commentable_type { "Article" }
factory :article_comment do
association :commentable, factory: :article
end
end
end