2023-02-21 18:55:31 -06:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-12 17:44:41 -05:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
describe ActivityPub::UpdateDistributionWorker do
|
|
|
|
subject { described_class.new }
|
|
|
|
|
|
|
|
let(:account) { Fabricate(:account) }
|
|
|
|
let(:follower) { Fabricate(:account, protocol: :activitypub, inbox_url: 'http://example.com') }
|
|
|
|
|
|
|
|
describe '#perform' do
|
|
|
|
before do
|
|
|
|
follower.follow!(account)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'delivers to followers' do
|
2022-02-10 12:42:45 -06:00
|
|
|
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), account.id, 'http://example.com', anything]])
|
2017-08-12 17:44:41 -05:00
|
|
|
subject.perform(account.id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|