mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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:
committed by
GitHub
parent
9e5e5d4078
commit
d119ec617e
@@ -151,6 +151,7 @@ module TestSetup
|
|||||||
OmniAuth.config.test_mode = false
|
OmniAuth.config.test_mode = false
|
||||||
|
|
||||||
Middleware::AnonymousCache.disable_anon_cache
|
Middleware::AnonymousCache.disable_anon_cache
|
||||||
|
BlockRequestsMiddleware.allow_requests!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -608,7 +609,6 @@ RSpec.configure do |config|
|
|||||||
driven_by driver.join("_").to_sym
|
driven_by driver.join("_").to_sym
|
||||||
|
|
||||||
setup_system_test
|
setup_system_test
|
||||||
BlockRequestsMiddleware.allow_requests!
|
|
||||||
end
|
end
|
||||||
|
|
||||||
config.after(:each, type: :system) do |example|
|
config.after(:each, type: :system) do |example|
|
||||||
|
|||||||
Reference in New Issue
Block a user