提交 8c4c5523 编写于 作者: K Kasper Timm Hansen

Merge pull request #25164 from y-yagi/add_missing_as_option_to_deprecation_message

add missing `as` to request kwargs of `ActionDispatch::IntegrationTest`
......@@ -300,7 +300,7 @@ def process_with_kwargs(http_method, path, *args)
end
end
REQUEST_KWARGS = %i(params headers env xhr)
REQUEST_KWARGS = %i(params headers env xhr as)
def kwarg_request?(args)
args[0].respond_to?(:keys) && args[0].keys.any? { |k| REQUEST_KWARGS.include?(k) }
end
......@@ -317,7 +317,8 @@ def non_kwarg_request_warning
params: { id: 1 },
headers: { 'X-Extra-Header' => '123' },
env: { 'action_dispatch.custom' => 'custom' },
xhr: true
xhr: true,
as: :json
MSG
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册