2023-02-22 09:55:31 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-13 07:44:41 +09: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-11 03:42:45 +09:00
|
|
|
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), account.id, 'http://example.com', anything]])
|
2017-08-13 07:44:41 +09:00
|
|
|
subject.perform(account.id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|