docbrown/spec/factories/podcasts.rb
Andy Zhao 5fab2f86b0
Always show the browse section of podcasts regardless of featured (#16329)
* Always show the browse section regardless of featured

* Add tests for /pod

* Use safe operator if there are no episodes to show

* Fix test for new podcast page

* Fix test again for podcast page
2022-03-22 12:56:54 -04:00

16 lines
547 B
Ruby

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