Reduce factory creation (132 -> 40) in lib/vacuum/* specs (#32498)
This commit is contained in:
parent
d74c2c583a
commit
0cc21f1ded
6 changed files with 41 additions and 58 deletions
|
@ -14,11 +14,11 @@ RSpec.describe Vacuum::FeedsVacuum do
|
|||
redis.zadd(feed_key_for(active_user), 1, 1)
|
||||
redis.zadd(feed_key_for(inactive_user, 'reblogs'), 2, 2)
|
||||
redis.sadd(feed_key_for(inactive_user, 'reblogs:2'), 3)
|
||||
|
||||
subject.perform
|
||||
end
|
||||
|
||||
it 'clears feeds of inactive users and lists' do
|
||||
subject.perform
|
||||
|
||||
expect(redis.zcard(feed_key_for(inactive_user))).to eq 0
|
||||
expect(redis.zcard(feed_key_for(active_user))).to eq 1
|
||||
expect(redis.exists?(feed_key_for(inactive_user, 'reblogs'))).to be false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue