Dont distribute personal limited post

This commit is contained in:
KMY 2023-09-26 18:10:21 +09:00
parent 28ab1ca973
commit af62d7f96a
2 changed files with 15 additions and 2 deletions

View file

@ -293,6 +293,19 @@ RSpec.describe PostStatusService, type: :service do
expect(ActivityPub::DistributionWorker).to have_received(:perform_async).with(status.id)
end
it 'gets distributed when personal post' do
allow(DistributionWorker).to receive(:perform_async)
allow(ActivityPub::DistributionWorker).to receive(:perform_async)
account = Fabricate(:account)
empty_circle = Fabricate(:circle, account: account)
status = subject.call(account, text: 'test status update', visibility: 'circle', circle_id: empty_circle.id)
expect(DistributionWorker).to have_received(:perform_async).with(status.id)
expect(ActivityPub::DistributionWorker).to_not have_received(:perform_async).with(status.id)
end
it 'crawls links' do
allow(LinkCrawlWorker).to receive(:perform_async)
account = Fabricate(:account)