mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-09-10 20:27:12 +00:00
Add a FeedManager example demonstrating non-mention keywords. #454.
This commit is contained in:
parent
a40e322f4b
commit
cf28049f0a
|
@ -222,6 +222,13 @@ RSpec.describe FeedManager do
|
||||||
bob.follow!(alice)
|
bob.follow!(alice)
|
||||||
expect(FeedManager.instance.filter?(:mentions, status, bob.id)).to be true
|
expect(FeedManager.instance.filter?(:mentions, status, bob.id)).to be true
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue