diff options
author | beatrix <beatrix.bitrot@gmail.com> | 2017-10-18 17:57:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-18 17:57:42 -0400 |
commit | c75665127878f41af2547b12b8723963c04d305b (patch) | |
tree | d8275432c259d0fcd1385c163d7f2472b4a8684c /spec/workers | |
parent | 4421f6598f5883908fb25743977306f19a0b0f0f (diff) | |
parent | eb907a5babed83a73788b16772fb2cba6db8c2b4 (diff) |
Merge pull request #188 from glitch-soc/merge-upstream-2-0-0
Merge with upstream v2.0.0
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/scheduler/feed_cleanup_scheduler_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb b/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb index b8487b03f..7fae680ba 100644 --- a/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/feed_cleanup_scheduler_spec.rb @@ -9,14 +9,18 @@ describe Scheduler::FeedCleanupScheduler do it 'clears feeds of inactives' do Redis.current.zadd(feed_key_for(inactive_user), 1, 1) Redis.current.zadd(feed_key_for(active_user), 1, 1) + Redis.current.zadd(feed_key_for(inactive_user, 'reblogs'), 2, 2) + Redis.current.sadd(feed_key_for(inactive_user, 'reblogs:2'), 3) 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 + expect(Redis.current.exists(feed_key_for(inactive_user, 'reblogs'))).to be false + expect(Redis.current.exists(feed_key_for(inactive_user, 'reblogs:2'))).to be false end - def feed_key_for(user) - FeedManager.instance.key(:home, user.account_id) + def feed_key_for(user, subtype = nil) + FeedManager.instance.key(:home, user.account_id, subtype) end end |