about summary refs log tree commit diff
path: root/spec/lib
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-06-26 22:54:09 +0200
committerThibaut Girka <thib@sitedethib.com>2019-06-26 23:19:22 +0200
commitaaec64a500346502aedefff446f1d8688ac5077c (patch)
treeb24b5c7fa4b500b00c85cee3ef2cbb553d763f4d /spec/lib
parent9ef25877dfda12cf31ec586294e4d4908f5be4f0 (diff)
parent3086c645fde2345d34e401bdf3e2f19f19da3294 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/controllers/settings/preferences_controller.rb
- app/lib/user_settings_decorator.rb
- app/models/user.rb
- config/locales/simple_form.en.yml
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/feed_manager_spec.rb8
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