about summary refs log tree commit diff
path: root/spec/services
diff options
context:
space:
mode:
authorAkihiko Odaki (@fn_aki@pawoo.net) <akihiko.odaki.4i@stu.hosei.ac.jp>2017-07-11 08:00:01 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-11 01:00:01 +0200
commit7bacdd718a143f54f47ddc3afa39504636be65c0 (patch)
treeb8e80020a816e329f52cb1325b48c1fe455bdace /spec/services
parent958fe0f7db6702d65791def89fceef77d6f43589 (diff)
Fix PrecomputeFeedService for filtered statuses (#4148)
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/precompute_feed_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/precompute_feed_service_spec.rb b/spec/services/precompute_feed_service_spec.rb
index e2294469c..dbd08ac1b 100644
--- a/spec/services/precompute_feed_service_spec.rb
+++ b/spec/services/precompute_feed_service_spec.rb
@@ -23,5 +23,17 @@ RSpec.describe PrecomputeFeedService do
       account = Fabricate(:account)
       subject.call(account)
     end
+
+    it 'filters statuses' do
+      account = Fabricate(:account)
+      muted_account = Fabricate(:account)
+      Fabricate(:mute, account: account, target_account: muted_account)
+      reblog = Fabricate(:status, account: muted_account)
+      status = Fabricate(:status, account: account, reblog: reblog)
+
+      subject.call(account)
+
+      expect(Redis.current.zscore(FeedManager.instance.key(:home, account.id), reblog.id)).to eq nil
+    end
   end
 end