mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 10:52:45 +08:00
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:
parent
9e5e5d4078
commit
d119ec617e
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue
Block a user