Fix home TL could contain post from who blocked me (#22849)
* Fix home tl contains post from who blocked me * Add test * Fix feed_manager's build_crutches blocked_by was not includes status' owner * Add test for status from I blocked * Fix typo
This commit is contained in:
parent
8eb29741b4
commit
fdd1facba1
2 changed files with 14 additions and 1 deletions
|
@ -39,6 +39,18 @@ RSpec.describe FeedManager do
|
|||
expect(FeedManager.instance.filter?(:home, reblog, bob)).to be false
|
||||
end
|
||||
|
||||
it 'returns true for post from account who blocked me' do
|
||||
status = Fabricate(:status, text: 'Hello, World', account: alice)
|
||||
alice.block!(bob)
|
||||
expect(FeedManager.instance.filter?(:home, status, bob)).to be true
|
||||
end
|
||||
|
||||
it 'returns true for post from blocked account' do
|
||||
status = Fabricate(:status, text: 'Hello, World', account: alice)
|
||||
bob.block!(alice)
|
||||
expect(FeedManager.instance.filter?(:home, status, bob)).to be true
|
||||
end
|
||||
|
||||
it 'returns true for reblog by followee of blocked account' do
|
||||
status = Fabricate(:status, text: 'Hello world', account: jeff)
|
||||
reblog = Fabricate(:status, reblog: status, account: alice)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue