mirror of
https://github.com/discourse/discourse.git
synced 2025-02-09 21:04:48 +00:00
DEV: Disable BlockRequestsMiddleware
before every test (#25712)
Why this change? This is a follow up to c30aeafd9db40bfbd848430359285547a1b1f605. 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
|
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|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user