mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user