mastodon/spec/workers/activitypub/processing_worker_spec.rb
Eugen Rochko b7370ac8ba ActivityPub delivery (#4566)
* Deliver ActivityPub Like

* Deliver ActivityPub Undo-Like

* Deliver ActivityPub Create/Announce activities

* Deliver ActivityPub creates from mentions

* Deliver ActivityPub Block/Undo-Block

* Deliver ActivityPub Accept/Reject-Follow

* Deliver ActivityPub Undo-Follow

* Deliver ActivityPub Follow

* Deliver ActivityPub Delete activities

Incidentally fix #889

* Adjust BatchedRemoveStatusService for ActivityPub

* Add tests for ActivityPub workers

* Add tests for FollowService

* Add tests for FavouriteService, UnfollowService and PostStatusService

* Add tests for ReblogService, BlockService, UnblockService, ProcessMentionsService

* Add tests for AuthorizeFollowService, RejectFollowService, RemoveStatusService

* Add tests for BatchedRemoveStatusService

* Deliver updates to a local account to ActivityPub followers

* Minor adjustments
2017-08-13 00:44:41 +02:00

16 lines
469 B
Ruby

require 'rails_helper'
describe ActivityPub::ProcessingWorker do
subject { described_class.new }
let(:account) { Fabricate(:account) }
describe '#perform' do
it 'delegates to ActivityPub::ProcessCollectionService' do
allow(ActivityPub::ProcessCollectionService).to receive(:new).and_return(double(:service, call: nil))
subject.perform(account.id, '')
expect(ActivityPub::ProcessCollectionService).to have_received(:new)
end
end
end