diff options
author | David Yip <yipdw@member.fsf.org> | 2018-06-03 23:04:00 -0500 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2018-06-03 23:04:00 -0500 |
commit | cf28049f0ac1bf9610039cd95ee485b0dcef7ea2 (patch) | |
tree | 0e30f652be5cc6893fd3c5e82e69d9c148ad6d49 | |
parent | a40e322f4b6784ef6cfee188e0e30167c32d27b9 (diff) |
Add a FeedManager example demonstrating non-mention keywords. #454.
-rw-r--r-- | spec/lib/feed_manager_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/feed_manager_spec.rb b/spec/lib/feed_manager_spec.rb index 62cc0fb2e..a958a9afe 100644 --- a/spec/lib/feed_manager_spec.rb +++ b/spec/lib/feed_manager_spec.rb @@ -222,6 +222,13 @@ RSpec.describe FeedManager do bob.follow!(alice) expect(FeedManager.instance.filter?(:mentions, status, bob.id)).to be true end + + it 'returns false for a mention that contains a word muted by a keyword that does not apply to mentions' do + Fabricate('Glitch::KeywordMute', account: bob, keyword: 'take', apply_to_mentions: false) + status = Fabricate(:status, text: 'This is a hot take', account: alice) + bob.follow!(alice) + expect(FeedManager.instance.filter?(:mentions, status, bob.id)).to be false + end end end |