Fix sidekiq JSON serialization warning in ActivityPub::FetchAllRepliesWorker (#34702)

This commit is contained in:
Claire 2025-05-16 11:07:33 +02:00 committed by GitHub
parent c058c45a8e
commit 3ea1f074ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -124,8 +124,6 @@ RSpec.describe ActivityPub::FetchAllRepliesWorker do
before do
stub_const('Status::FetchRepliesConcern::FETCH_REPLIES_ENABLED', true)
allow(FetchReplyWorker).to receive(:push_bulk)
allow(FetchReplyWorker).to receive(:perform_async)
all_items.each do |item|
next if [top_note_uri, reply_note_uri].include? item
@ -150,7 +148,7 @@ RSpec.describe ActivityPub::FetchAllRepliesWorker do
it 'fetches the top status only once' do
_ = subject.perform(status.id, { request_id: 0 })
expect(FetchReplyWorker).to have_received(:perform_async).with(top_note_uri, { prefetched_body: top_object.deep_stringify_keys, request_id: 0 })
expect(FetchReplyWorker).to have_enqueued_sidekiq_job(top_note_uri, { 'prefetched_body' => top_object.deep_stringify_keys, 'request_id' => 0 })
expect(a_request(:get, top_note_uri)).to have_been_made.once
end
end