Add ability to filter followed accounts' posts by language (#19095)
This commit is contained in:
@ -127,6 +127,18 @@ RSpec.describe FeedManager do
|
||||
reblog = Fabricate(:status, reblog: status, account: jeff)
|
||||
expect(FeedManager.instance.filter?(:home, reblog, alice)).to be true
|
||||
end
|
||||
|
||||
it 'returns true for German post when follow is set to English only' do
|
||||
alice.follow!(bob, languages: %w(en))
|
||||
status = Fabricate(:status, text: 'Hallo Welt', account: bob, language: 'de')
|
||||
expect(FeedManager.instance.filter?(:home, status, alice)).to be true
|
||||
end
|
||||
|
||||
it 'returns false for German post when follow is set to German' do
|
||||
alice.follow!(bob, languages: %w(de))
|
||||
status = Fabricate(:status, text: 'Hallo Welt', account: bob, language: 'de')
|
||||
expect(FeedManager.instance.filter?(:home, status, alice)).to be false
|
||||
end
|
||||
end
|
||||
|
||||
context 'for mentions feed' do
|
||||
|
Reference in New Issue
Block a user