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:
Alan Guo Xiang Tan
2024-10-09 06:36:47 +08:00
committed by GitHub
parent 2099c33fa7
commit a243d1d6a1

View File

@ -55,6 +55,8 @@ RSpec.describe GlobalSetting do
Discourse.stubs(:redis).returns(nil)
end
after { GlobalSetting.skip_redis = false }
it "generates a new random key in memory without redis" do
GlobalSetting.reset_secret_key_base!
token = GlobalSetting.safe_secret_key_base