Add notifications of severed relationships (#27511)
This commit is contained in:
parent
8a1423a474
commit
44bf7b8128
39 changed files with 781 additions and 54 deletions
|
@ -59,7 +59,7 @@ RSpec.describe SuspendAccountService, :sidekiq_inline do
|
|||
remote_follower.follow!(account)
|
||||
end
|
||||
|
||||
it 'sends an update actor to followers and reporters' do
|
||||
it 'sends an Update actor activity to followers and reporters' do
|
||||
subject
|
||||
expect(a_request(:post, remote_follower.inbox_url).with { |req| match_update_actor_request(req, account) }).to have_been_made.once
|
||||
expect(a_request(:post, remote_reporter.inbox_url).with { |req| match_update_actor_request(req, account) }).to have_been_made.once
|
||||
|
@ -85,9 +85,14 @@ RSpec.describe SuspendAccountService, :sidekiq_inline do
|
|||
account.follow!(local_followee)
|
||||
end
|
||||
|
||||
it 'sends a reject follow' do
|
||||
it 'sends a Reject Follow activity, and records severed relationships', :aggregate_failures do
|
||||
subject
|
||||
|
||||
expect(a_request(:post, account.inbox_url).with { |req| match_reject_follow_request(req, account, local_followee) }).to have_been_made.once
|
||||
|
||||
severed_relationships = local_followee.severed_relationships.to_a
|
||||
expect(severed_relationships.count).to eq 1
|
||||
expect(severed_relationships.map { |rel| [rel.account, rel.target_account] }).to contain_exactly([account, local_followee])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue