Merge remote-tracking branch 'parent/main' into upstream-20231221

This commit is contained in:
KMY 2023-12-21 08:37:12 +09:00
commit a6b57e3890
154 changed files with 7762 additions and 1748 deletions

View file

@ -10,14 +10,17 @@ RSpec.describe UpdateAccountService, type: :service do
let(:alice) { Fabricate(:account) }
let(:bob) { Fabricate(:account) }
let(:eve) { Fabricate(:account) }
let(:ohagi) { Fabricate(:account, domain: 'example.com', uri: 'https://example.com/actor') }
before do
bob.touch(:silenced_at)
account.mute!(eve)
Fabricate(:domain_block, domain: 'example.com', reject_straight_follow: true)
FollowService.new.call(alice, account)
FollowService.new.call(bob, account)
FollowService.new.call(eve, account)
FollowService.new.call(ohagi, account)
subject.call(account, { locked: false })
end
@ -36,5 +39,10 @@ RSpec.describe UpdateAccountService, type: :service do
expect(eve.following?(account)).to be true
expect(eve.requested?(account)).to be false
end
it 'does not auto-accept pending follow requests from blocking straight follow domains' do
expect(ohagi.following?(account)).to be false
expect(ohagi.requested?(account)).to be true
end
end
end