Fix processing of compacted single-item JSON-LD collections (#28816)
This commit is contained in:
parent
3593ee2e36
commit
cf2a2ed71c
6 changed files with 51 additions and 9 deletions
|
@ -34,6 +34,18 @@ RSpec.describe ActivityPub::FetchRepliesService, type: :service do
|
|||
|
||||
describe '#call' do
|
||||
context 'when the payload is a Collection with inlined replies' do
|
||||
context 'when there is a single reply, with the array compacted away' do
|
||||
let(:items) { 'http://example.com/self-reply-1' }
|
||||
|
||||
it 'queues the expected worker' do
|
||||
allow(FetchReplyWorker).to receive(:push_bulk)
|
||||
|
||||
subject.call(status, payload)
|
||||
|
||||
expect(FetchReplyWorker).to have_received(:push_bulk).with(['http://example.com/self-reply-1'])
|
||||
end
|
||||
end
|
||||
|
||||
context 'when passing the collection itself' do
|
||||
it 'spawns workers for up to 5 replies on the same server' do
|
||||
allow(FetchReplyWorker).to receive(:push_bulk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue