0
0
Fork 0

Overwrite old statuses with reblogs in PrecomputeFeedService (#3984)

This commit is contained in:
Akihiko Odaki (@fn_aki@pawoo.net) 2017-06-28 21:50:23 +09:00 committed by Eugen Rochko
parent fb421a1f46
commit 7d8e3721ae
5 changed files with 19 additions and 10 deletions

View file

@ -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