diff options
author | ThibG <thib@sitedethib.com> | 2019-06-27 16:43:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 16:43:55 +0200 |
commit | 2f95adc06fbfae22e8f9b4df212938108f5e295c (patch) | |
tree | 13ff1b5ae743f3d147eb58dfa4a790ef1a7c049d /spec/lib | |
parent | 9ef25877dfda12cf31ec586294e4d4908f5be4f0 (diff) | |
parent | 6ab7051b48dcb1d45c377a129350db1fdeaf11b8 (diff) |
Merge pull request #1142 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/feed_manager_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/feed_manager_spec.rb b/spec/lib/feed_manager_spec.rb index 13850f807..d00dd0b55 100644 --- a/spec/lib/feed_manager_spec.rb +++ b/spec/lib/feed_manager_spec.rb @@ -156,6 +156,14 @@ RSpec.describe FeedManager do status = Fabricate(:status, text: 'shiitake', account: jeff) expect(FeedManager.instance.filter?(:home, status, alice.id)).to be true end + + it 'returns true if phrase is contained in a poll option' do + alice.custom_filters.create!(phrase: 'farts', context: %w(home public), irreversible: true) + alice.custom_filters.create!(phrase: 'pop tarts', context: %w(home), irreversible: true) + alice.follow!(jeff) + status = Fabricate(:status, text: 'what do you prefer', poll: Fabricate(:poll, options: %w(farts POP TARts)), account: jeff) + expect(FeedManager.instance.filter?(:home, status, alice.id)).to be true + end end end |