processing_worker_spec.rb 547 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe ActivityPub::ProcessingWorker do
  4. subject { described_class.new }
  5. let(:account) { Fabricate(:account) }
  6. describe '#perform' do
  7. it 'delegates to ActivityPub::ProcessCollectionService' do
  8. allow(ActivityPub::ProcessCollectionService).to receive(:new)
  9. .and_return(instance_double(ActivityPub::ProcessCollectionService, call: nil))
  10. subject.perform(account.id, '')
  11. expect(ActivityPub::ProcessCollectionService).to have_received(:new)
  12. end
  13. end
  14. end