DEV: correct intermittent test failure

ActionController::BadRequest can not be re-dispatched, under some conditions
we are getting this vs InvalidParameterError in the following test

https://github.com/discourse/discourse/blob/59c56bd20f4adc00732d712c6ec81a9239bc24ae/spec/requests/application_controller_spec.rb#L34-L62
This commit is contained in:
Sam
2018-12-13 18:27:13 +11:00
parent 8ef2085585
commit 939b82ef0c
@@ -20,6 +20,9 @@ module Middleware
# the Request object has a "broken" .params which can not be accessed
exception = nil if Rack::QueryParser::InvalidParameterError === exception
# We also can not dispatch bad requests as no proper params
exception = nil if ActionController::BadRequest === exception
if exception
begin
fake_controller = ApplicationController.new