Merge remote-tracking branch 'parent/main' into kbtopic-remove-quote

This commit is contained in:
KMY 2025-05-13 07:37:34 +09:00
commit 04070aa608
50 changed files with 2139 additions and 2333 deletions

View file

@ -125,6 +125,7 @@ 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
@ -146,6 +147,12 @@ RSpec.describe ActivityPub::FetchAllRepliesWorker do
got_uris = subject.perform(status.id)
expect(got_uris).to match_array(top_items + top_items_paged)
end
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(a_request(:get, top_note_uri)).to have_been_made.once
end
end
describe 'perform' do