This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2020-07-01 13:51:15 +02:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
describe ActivityPub::MoveDistributionWorker do
|
|
|
|
subject { described_class.new }
|
|
|
|
|
|
|
|
let(:migration) { Fabricate(:account_migration) }
|
|
|
|
let(:follower) { Fabricate(:account, protocol: :activitypub, inbox_url: 'http://example.com') }
|
|
|
|
let(:blocker) { Fabricate(:account, protocol: :activitypub, inbox_url: 'http://example2.com') }
|
|
|
|
|
|
|
|
describe '#perform' do
|
|
|
|
before do
|
|
|
|
follower.follow!(migration.account)
|
|
|
|
blocker.block!(migration.account)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'delivers to followers and known blockers' do
|
2022-02-10 19:42:45 +01:00
|
|
|
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [
|
|
|
|
[kind_of(String), migration.account.id, 'http://example.com'],
|
|
|
|
[kind_of(String), migration.account.id, 'http://example2.com']
|
|
|
|
])
|
2020-07-01 13:51:15 +02:00
|
|
|
subject.perform(migration.id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|