Skip to content

Commit

Permalink
Clarify the tested pub item
Browse files Browse the repository at this point in the history
  • Loading branch information
svevang committed Aug 9, 2023
1 parent dcc6b02 commit bf03880
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/models/publishing_pipeline_state_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,20 @@
it "ignores previously errored pipelines back in the queue" do
# A failed pipeline
PublishingPipelineState.start_pipeline!(podcast)
assert_equal ["created"], PublishingPipelineState.latest_pipeline(podcast).map(&:status)
PublishingPipelineState.error!(podcast)
assert_equal ["created", "error"].sort, PublishingPipelineState.latest_pipeline(podcast).map(&:status).sort

# A new pipeline
PublishingPipelineState.start_pipeline!(podcast)
PublishingPipelineState.publish_rss!(podcast)
assert_equal ["created", "published_rss"], PublishingPipelineState.latest_pipeline(podcast).map(&:status)
publishing_item = PublishingPipelineState.latest_pipeline(podcast).map(&:publishing_queue_item_id).uniq

# it does not retry the errored pipeline
PublishingPipelineState.retry_failed_pipelines!
assert_equal ["created", "published_rss"].sort, PublishingPipelineState.latest_pipeline(podcast).map(&:status).sort
# it's the same publishing item
assert_equal publishing_item, PublishingPipelineState.latest_pipeline(podcast).map(&:publishing_queue_item_id).uniq
end
end

Expand Down

0 comments on commit bf03880

Please sign in to comment.