0
0
Fork 0

Also run the keyword matcher on a status' tags. #208.

This commit is contained in:
David Yip 2017-11-06 16:48:36 -06:00
parent 04508868b0
commit 431503bae2
2 changed files with 22 additions and 2 deletions

View file

@ -164,6 +164,22 @@ RSpec.describe FeedManager do
expect(FeedManager.instance.filter?(:home, reblog, alice.id)).to be true
end
it 'returns true for a status with a tag that matches a muted keyword' do
Fabricate('Glitch::KeywordMute', account: alice, keyword: 'jorts')
status = Fabricate(:status, account: bob)
status.tags << Fabricate(:tag, name: 'jorts')
expect(FeedManager.instance.filter?(:home, status, alice.id)).to be true
end
it 'returns true for a status with a tag that matches an octothorpe-prefixed muted keyword' do
Fabricate('Glitch::KeywordMute', account: alice, keyword: '#jorts')
status = Fabricate(:status, account: bob)
status.tags << Fabricate(:tag, name: 'jorts')
expect(FeedManager.instance.filter?(:home, status, alice.id)).to be true
end
end
context 'for mentions feed' do