mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Federate Remove when collection is deleted (#37741)
This commit is contained in:
21
spec/services/delete_collection_service_spec.rb
Normal file
21
spec/services/delete_collection_service_spec.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe DeleteCollectionService do
|
||||
subject { described_class.new }
|
||||
|
||||
let!(:collection) { Fabricate(:collection) }
|
||||
|
||||
describe '#call' do
|
||||
it 'destroys the collection' do
|
||||
expect { subject.call(collection) }.to change(Collection, :count).by(-1)
|
||||
end
|
||||
|
||||
it 'federates a `Remove` activity', feature: :collections_federation do
|
||||
subject.call(collection)
|
||||
|
||||
expect(ActivityPub::AccountRawDistributionWorker).to have_enqueued_sidekiq_job
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user