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

59c56bd20f/spec/requests/application_controller_spec.rb (L34-L62)
This commit is contained in:
Sam
2018-12-13 18:27:02 +11:00
parent 8ef2085585
commit 939b82ef0c

View File

@ -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