mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 02:48:28 +08:00
DEV: s/\$redis/Discourse\.redis (#8431)
This commit also adds a rubocop rule to prevent global variables.
This commit is contained in:
@ -143,7 +143,7 @@ describe Middleware::AnonymousCache::Helper do
|
||||
|
||||
# depends on i7z implementation, but lets assume it is stable unless we discover
|
||||
# otherwise
|
||||
expect($redis.get(helper.cache_key_body).length).to eq(16)
|
||||
expect(Discourse.redis.get(helper.cache_key_body).length).to eq(16)
|
||||
end
|
||||
|
||||
it "handles brotli switching" do
|
||||
|
@ -264,7 +264,7 @@ describe Middleware::RequestTracker do
|
||||
User.where(id: -100).pluck(:id)
|
||||
end
|
||||
redis_calls.times do
|
||||
$redis.get("x")
|
||||
Discourse.redis.get("x")
|
||||
end
|
||||
result
|
||||
end
|
||||
|
Reference in New Issue
Block a user