Ensure models don't leak between test through RequestStore, for example User.anonymous

This commit is contained in:
Ivan Kuchin
2025-09-09 17:31:32 +02:00
committed by Ivan Kuchin
parent cfe58355b0
commit 36866670ec
+5
View File
@@ -16,6 +16,11 @@ RSpec.configure do |config|
RequestStore.clear!
end
config.append_after(:all) do
# Ensure models don't leak between test through RequestStore if it is used in after(:all)
RequestStore.clear!
end
# We don't want this to be reported on CI as it breaks the build
unless ENV["CI"]
config.append_after(:suite) do