diff options
author | Akihiko Odaki (@fn_aki@pawoo.net) <akihiko.odaki.4i@stu.hosei.ac.jp> | 2017-06-28 21:50:23 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-06-28 14:50:23 +0200 |
commit | 7d8e3721aea71315b0ef8e66cdc2ede0fe6ffc2a (patch) | |
tree | 20dbe2a273fd8ffa22d9e85d3bc9e5de81a89c01 /spec/workers/scheduler | |
parent | fb421a1f46d956e62d27d0227e6853c709f2c88e (diff) |
Overwrite old statuses with reblogs in PrecomputeFeedService (#3984)
Diffstat (limited to 'spec/workers/scheduler')
-rw-r--r-- | spec/workers/scheduler/feed_cleanup_scheduler_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb b/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb index 4c709a2c9..b8487b03f 100644 --- a/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb @@ -7,10 +7,13 @@ describe Scheduler::FeedCleanupScheduler do let!(:inactive_user) { Fabricate(:user, current_sign_in_at: 22.days.ago) } it 'clears feeds of inactives' do - expect_any_instance_of(Redis).to receive(:del).with(feed_key_for(inactive_user)) - expect_any_instance_of(Redis).not_to receive(:del).with(feed_key_for(active_user)) + Redis.current.zadd(feed_key_for(inactive_user), 1, 1) + Redis.current.zadd(feed_key_for(active_user), 1, 1) subject.perform + + expect(Redis.current.zcard(feed_key_for(inactive_user))).to eq 0 + expect(Redis.current.zcard(feed_key_for(active_user))).to eq 1 end def feed_key_for(user) |