aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/test_case_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/test_case_test.rb')
-rw-r--r--actionpack/test/controller/test_case_test.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb
index e348749f78..4bda440331 100644
--- a/actionpack/test/controller/test_case_test.rb
+++ b/actionpack/test/controller/test_case_test.rb
@@ -48,6 +48,14 @@ class TestCaseTest < ActionController::TestCase
render text: params.inspect
end
+ def test_query_parameters
+ render text: request.query_parameters.inspect
+ end
+
+ def test_request_parameters
+ render text: request.request_parameters.inspect
+ end
+
def test_uri
render text: request.fullpath
end
@@ -547,6 +555,18 @@ XML
)
end
+ def test_query_param_named_action
+ get :test_query_parameters, params: {action: 'foobar'}
+ parsed_params = eval(@response.body)
+ assert_equal({action: 'foobar'}, parsed_params)
+ end
+
+ def test_request_param_named_action
+ post :test_request_parameters, params: {action: 'foobar'}
+ parsed_params = eval(@response.body)
+ assert_equal({'action' => 'foobar'}, parsed_params)
+ end
+
def test_kwarg_params_passing_with_session_and_flash
get :test_params, params: {
page: {