docbrown/spec/factories/podcasts.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

16 lines
485 B
Ruby

FactoryBot.define do
image = Rack::Test::UploadedFile.new(
Rails.root.join("spec", "support", "fixtures", "images", "image1.jpeg"),
"image/jpeg",
)
factory :podcast do
title { Faker::Beer.name }
image { image }
description { Faker::Hipster.paragraph(sentence_count: 1) }
slug { "slug-#{rand(10_000)}" }
feed_url { Faker::Internet.url }
main_color_hex { "ffffff" }
published { true }
end
end