mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
DEV: Fix state leak in spec (#29135)
`GlobalSetting.skip_redis` sets a class instance variable so we need to reset it. Follow-up to 7d441e378285fa37431ab49a001fc57eb75bb469
This commit is contained in:

committed by
GitHub

parent
2099c33fa7
commit
a243d1d6a1
@ -55,6 +55,8 @@ RSpec.describe GlobalSetting do
|
|||||||
Discourse.stubs(:redis).returns(nil)
|
Discourse.stubs(:redis).returns(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
after { GlobalSetting.skip_redis = false }
|
||||||
|
|
||||||
it "generates a new random key in memory without redis" do
|
it "generates a new random key in memory without redis" do
|
||||||
GlobalSetting.reset_secret_key_base!
|
GlobalSetting.reset_secret_key_base!
|
||||||
token = GlobalSetting.safe_secret_key_base
|
token = GlobalSetting.safe_secret_key_base
|
||||||
|
Reference in New Issue
Block a user