DEV: Disable BlockRequestsMiddleware before every test (#25712)

Why this change?

This is a follow up to c30aeafd9d. The
commit was calling `BlockRequestsMiddleware.allow_requests!` only before
`type: :system` tests but non system type tests could be running as well
and needs the `BlockRequestsMiddleware.allow_requests!` middleware to be
disabled too.
This commit is contained in:
Alan Guo Xiang Tan 2024-02-16 07:01:36 +08:00 committed by GitHub
parent 9e5e5d4078
commit d119ec617e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -151,6 +151,7 @@ module TestSetup
OmniAuth.config.test_mode = false
Middleware::AnonymousCache.disable_anon_cache
BlockRequestsMiddleware.allow_requests!
end
end
@ -608,7 +609,6 @@ RSpec.configure do |config|
driven_by driver.join("_").to_sym
setup_system_test
BlockRequestsMiddleware.allow_requests!
end
config.after(:each, type: :system) do |example|