未验证 提交 e2cc2d1d 编写于 作者: E Eugene Kenny 提交者: GitHub

Merge pull request #39740 from khustochka/fix-symbol

Fix path_parameters key type inconsistency in ActionController::TestCase
......@@ -91,7 +91,7 @@ def assign_parameters(routes, controller_path, action, parameters, generated_pat
end
end
path_parameters[key] = value
path_parameters[key.to_sym] = value
end
end
......
......@@ -613,6 +613,12 @@ def test_using_as_json_with_empty_params
assert_equal({ "bar" => [] }, JSON.load(response.body)["foo"])
end
def test_using_as_json_with_path_parameters
post :test_params, params: { id: "12345" }, as: :json
assert_equal("12345", @request.path_parameters[:id])
end
def test_mutating_content_type_headers_for_plain_text_files_sets_the_header
@request.headers["Content-Type"] = "text/plain"
post :render_body, params: { name: "foo.txt" }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册