DEV: Upgrade Redis to 4.8

This commit is contained in:
Alan Guo Xiang Tan
2022-08-24 14:28:06 +08:00
parent 7f198bd975
commit 0b5a0fd857
3 changed files with 25 additions and 5 deletions

View File

@ -113,6 +113,26 @@ RSpec.describe DiscourseRedis do
expect(redis.mget('key1', 'key2')).to eq(['1', '2'])
expect(redis.scan_each.to_a).to contain_exactly('key1', 'key2')
end
describe '#sadd?' do
it "should send the right command with the right key prefix to redis" do
redis = DiscourseRedis.new
redis.without_namespace.expects(:sadd?).with("default:testset", "1")
redis.sadd?("testset", "1")
end
end
describe '#srem?' do
it "should send the right command with the right key prefix to redis" do
redis = DiscourseRedis.new
redis.without_namespace.expects(:srem?).with("default:testset", "1")
redis.srem?("testset", "1")
end
end
end
describe 'when namespace is disabled' do