From eb37fd0aec4fdc5122ceeb8a56b1e9b0cb5e3b76 Mon Sep 17 00:00:00 2001 From: r7kamura Date: Tue, 18 Dec 2018 18:34:14 +0900 Subject: Allow nil params on controller HTTP test methods --- actionpack/test/controller/test_case_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb index c931e2daac..bc64135589 100644 --- a/actionpack/test/controller/test_case_test.rb +++ b/actionpack/test/controller/test_case_test.rb @@ -478,6 +478,18 @@ XML ) end + def test_nil_params + get :test_params, params: nil + parsed_params = JSON.parse(@response.body) + assert_equal( + { + "action" => "test_params", + "controller" => "test_case_test/test" + }, + parsed_params + ) + end + def test_query_param_named_action get :test_query_parameters, params: { action: "foobar" } parsed_params = JSON.parse(@response.body) -- cgit v1.2.3