diff --git a/test/unit/app/services/bulk_republisher_test.rb b/test/unit/app/services/bulk_republisher_test.rb index fca5cfd0a75..0b7fb58da0f 100644 --- a/test/unit/app/services/bulk_republisher_test.rb +++ b/test/unit/app/services/bulk_republisher_test.rb @@ -50,13 +50,6 @@ class BulkRepublisherTest < ActiveSupport::TestCase describe "#republish_all_documents_with_pre_publication_editions" do test "queues all documents with pre-publication editions for republishing" do - document_without_pre_publication_edition = create(:document, editions: [build(:published_edition)]) - - PublishingApiDocumentRepublishingWorker - .expects(:perform_async_in_queue) - .with("bulk_republishing", document_without_pre_publication_edition.id, true) - .never - queue_sequence = sequence("queue") 2.times do @@ -70,5 +63,16 @@ class BulkRepublisherTest < ActiveSupport::TestCase BulkRepublisher.new.republish_all_documents_with_pre_publication_editions end + + test "doesn't queue documents without pre-publication editions for republishing" do + document = create(:document, editions: [build(:published_edition)]) + + PublishingApiDocumentRepublishingWorker + .expects(:perform_async_in_queue) + .with("bulk_republishing", document.id, true) + .never + + BulkRepublisher.new.republish_all_documents_with_pre_publication_editions + end end end