From 7bacdd718a143f54f47ddc3afa39504636be65c0 Mon Sep 17 00:00:00 2001 From: "Akihiko Odaki (@fn_aki@pawoo.net)" Date: Tue, 11 Jul 2017 08:00:01 +0900 Subject: Fix PrecomputeFeedService for filtered statuses (#4148) --- spec/services/precompute_feed_service_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'spec') 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 -- cgit