ensl.org/spec/factories/post.rb

12 lines
237 B
Ruby
Raw Normal View History

FactoryBot.define do
2015-08-20 14:57:29 +00:00
factory :post do
sequence(:text) { |n| "Post Body #{n}" }
topic
user
2020-03-22 12:22:10 +00:00
trait :with_content do
text { (0..100).map { (0...8).map { (65 + rand(26)).chr }.join }.join(" ") }
end
2015-08-20 14:57:29 +00:00
end
2015-08-20 15:35:25 +00:00
end