logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

update_distribution_worker_spec.rb (579B)


  1. require 'rails_helper'
  2. describe ActivityPub::UpdateDistributionWorker do
  3. subject { described_class.new }
  4. let(:account) { Fabricate(:account) }
  5. let(:follower) { Fabricate(:account, protocol: :activitypub, inbox_url: 'http://example.com') }
  6. describe '#perform' do
  7. before do
  8. allow(ActivityPub::DeliveryWorker).to receive(:push_bulk)
  9. follower.follow!(account)
  10. end
  11. it 'delivers to followers' do
  12. subject.perform(account.id)
  13. expect(ActivityPub::DeliveryWorker).to have_received(:push_bulk).with(['http://example.com'])
  14. end
  15. end
  16. end