Compare commits

...

2 Commits

Author SHA1 Message Date
Ted Nyman
f46236555e Middleware test 2013-12-03 14:11:37 -08:00
Ted Nyman
ec15cd282d Add EarlyParse for test 2013-12-03 13:59:05 -08:00

View File

@@ -11,6 +11,17 @@ class QueryStringParsingTest < ActionController::IntegrationTest
head :ok
end
end
class EarlyParse
def initialize(app)
@app = app
end
def call(env)
# Trigger a Rack parse so that env caches the query params
Rack::Request.new(env).params
@app.call(env)
end
end
def teardown
TestController.last_query_parameters = nil
@@ -111,6 +122,8 @@ class QueryStringParsingTest < ActionController::IntegrationTest
set.draw do |map|
map.connect ':action', :controller => "query_string_parsing_test/test"
end
@stack = ActionController::MiddlewareStack.new
@stack.use(EarlyParse)
get "/parse", actual
assert_response :ok