[deploy] Ensure podcast episodes are created with processed_html (#10715)

This commit is contained in:
Ben Halpern 2020-10-07 12:09:36 -04:00 committed by GitHub
parent 0ed408a409
commit 36b1edb3e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -70,6 +70,7 @@ module Podcasts
def finalize(episode)
episode.purge_all
episode.index_to_elasticsearch
episode.save if episode.processed_html.blank?
end
end
end

View file

@ -32,6 +32,11 @@ RSpec.describe Podcasts::CreateEpisode, type: :service do
expect(episode.guid).to include("53b17a1e-271b-40e3-a084-a67b4fcba562")
end
it "populates processed_html" do
episode = described_class.call(podcast.id, item)
expect(episode.processed_html).not_to be_blank
end
it "sets correct availability statuses" do
episode = described_class.call(podcast.id, item)
expect(episode.https?).to be true