Also filter notifications containing muted keywords.

This commit is contained in:
David Yip
2017-10-24 18:51:27 -05:00
parent 9226257a1b
commit d03b48cea0
2 changed files with 9 additions and 1 deletions

View File

@ -185,6 +185,13 @@ RSpec.describe FeedManager do
bob.follow!(alice)
expect(FeedManager.instance.filter?(:mentions, status, bob.id)).to be false
end
it 'returns true for status that contains a muted keyword' do
Fabricate('Glitch::KeywordMute', account: bob, keyword: 'take')
status = Fabricate(:status, text: 'This is a hot take', account: alice)
bob.follow!(alice)
expect(FeedManager.instance.filter?(:mentions, status, bob.id)).to be true
end
end
end