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-06-28 21:50:23 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-28 14:50:23 +0200
commit7d8e3721aea71315b0ef8e66cdc2ede0fe6ffc2a (patch)
tree20dbe2a273fd8ffa22d9e85d3bc9e5de81a89c01 /spec/services
parentfb421a1f46d956e62d27d0227e6853c709f2c88e (diff)
Overwrite old statuses with reblogs in PrecomputeFeedService (#3984)
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/precompute_feed_service_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/services/precompute_feed_service_spec.rb b/spec/services/precompute_feed_service_spec.rb
index 9f56b0256..72235a966 100644
--- a/spec/services/precompute_feed_service_spec.rb
+++ b/spec/services/precompute_feed_service_spec.rb
@@ -11,12 +11,12 @@ RSpec.describe PrecomputeFeedService do
       account = Fabricate(:account)
       followed_account = Fabricate(:account)
       Fabricate(:follow, account: account, target_account: followed_account)
-      status = Fabricate(:status, account: followed_account)
-
-      expected_redis_args = FeedManager.instance.key(:home, account.id), status.id, status.id
-      expect_any_instance_of(Redis).to receive(:zadd).with(*expected_redis_args)
+      reblog = Fabricate(:status, account: followed_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 status.id
     end
   end
 end