diff options
Diffstat (limited to 'actionpack/test/controller/test_case_test.rb')
-rw-r--r-- | actionpack/test/controller/test_case_test.rb | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb index 45bc770e86..2d78fc71a9 100644 --- a/actionpack/test/controller/test_case_test.rb +++ b/actionpack/test/controller/test_case_test.rb @@ -239,7 +239,7 @@ XML def test_document_body_and_params_with_post post :test_params, params: { id: 1 } - assert_equal({"id"=>"1", "controller"=>"test_case_test/test", "action"=>"test_params"}, ::JSON.parse(@response.body)) + assert_equal({ "id"=>"1", "controller"=>"test_case_test/test", "action"=>"test_params" }, ::JSON.parse(@response.body)) end def test_document_body_with_post @@ -525,15 +525,15 @@ XML end def test_query_param_named_action - get :test_query_parameters, params: {action: "foobar"} + get :test_query_parameters, params: { action: "foobar" } parsed_params = JSON.parse(@response.body) - assert_equal({"action" => "foobar"}, parsed_params) + assert_equal({ "action" => "foobar" }, parsed_params) end def test_request_param_named_action - post :test_request_parameters, params: {action: "foobar"} + post :test_request_parameters, params: { action: "foobar" } parsed_params = eval(@response.body) - assert_equal({"action" => "foobar"}, parsed_params) + assert_equal({ "action" => "foobar" }, parsed_params) end def test_kwarg_params_passing_with_session_and_flash @@ -548,8 +548,8 @@ XML parsed_params = ::JSON.parse(@response.body) assert_equal( - {"controller" => "test_case_test/test", "action" => "test_params", - "page" => {"name" => "Page name", "month" => "4", "year" => "2004", "day" => "6"}}, + { "controller" => "test_case_test/test", "action" => "test_params", + "page" => { "name" => "Page name", "month" => "4", "year" => "2004", "day" => "6" } }, parsed_params ) @@ -563,8 +563,8 @@ XML } parsed_params = ::JSON.parse(@response.body) assert_equal( - {"controller" => "test_case_test/test", "action" => "test_params", - "page" => {"name" => "Page name", "month" => "4", "year" => "2004", "day" => "6"}}, + { "controller" => "test_case_test/test", "action" => "test_params", + "page" => { "name" => "Page name", "month" => "4", "year" => "2004", "day" => "6" } }, parsed_params ) end @@ -573,7 +573,7 @@ XML get :test_params, params: { format: "json", count: 999 } parsed_params = ::JSON.parse(@response.body) assert_equal( - {"controller" => "test_case_test/test", "action" => "test_params", + { "controller" => "test_case_test/test", "action" => "test_params", "format" => "json", "count" => "999" }, parsed_params ) @@ -583,7 +583,7 @@ XML get :test_params, params: { format: "json", id: 1 } parsed_params = ::JSON.parse(@response.body) assert_equal( - {"controller" => "test_case_test/test", "action" => "test_params", + { "controller" => "test_case_test/test", "action" => "test_params", "format" => "json", "id" => "1" }, parsed_params ) @@ -593,7 +593,7 @@ XML assert_deprecated { get :test_params, format: "json", id: 1 } parsed_params = ::JSON.parse(@response.body) assert_equal( - {"controller" => "test_case_test/test", "action" => "test_params", + { "controller" => "test_case_test/test", "action" => "test_params", "format" => "json", "id" => "1" }, parsed_params ) @@ -607,8 +607,8 @@ XML end parsed_params = ::JSON.parse(@response.body) assert_equal( - {"controller" => "test_case_test/test", "action" => "test_params", - "frozen" => "icy", "frozens" => ["icy"], "deepfreeze" => { "frozen" => "icy" }}, + { "controller" => "test_case_test/test", "action" => "test_params", + "frozen" => "icy", "frozens" => ["icy"], "deepfreeze" => { "frozen" => "icy" } }, parsed_params ) end @@ -670,7 +670,7 @@ XML end def test_deprecared_id_converted_to_string - assert_deprecated { get :test_params, id: 20, foo: Object.new} + assert_deprecated { get :test_params, id: 20, foo: Object.new } assert_kind_of String, @request.path_parameters[:id] end @@ -731,13 +731,13 @@ XML def test_deprecated_xhr_with_params assert_deprecated { xhr :get, :test_params, params: { id: 1 } } - assert_equal({"id"=>"1", "controller"=>"test_case_test/test", "action"=>"test_params"}, ::JSON.parse(@response.body)) + assert_equal({ "id"=>"1", "controller"=>"test_case_test/test", "action"=>"test_params" }, ::JSON.parse(@response.body)) end def test_xhr_with_params get :test_params, params: { id: 1 }, xhr: true - assert_equal({"id"=>"1", "controller"=>"test_case_test/test", "action"=>"test_params"}, ::JSON.parse(@response.body)) + assert_equal({ "id"=>"1", "controller"=>"test_case_test/test", "action"=>"test_params" }, ::JSON.parse(@response.body)) end def test_xhr_with_session @@ -856,10 +856,10 @@ XML def test_multiple_mixed_method_process_should_scrub_rack_input post :test_params, params: { id: 1, foo: "an foo" } - assert_equal({"id"=>"1", "foo" => "an foo", "controller"=>"test_case_test/test", "action"=>"test_params"}, ::JSON.parse(@response.body)) + assert_equal({ "id"=>"1", "foo" => "an foo", "controller"=>"test_case_test/test", "action"=>"test_params" }, ::JSON.parse(@response.body)) get :test_params, params: { bar: "an bar" } - assert_equal({"bar"=>"an bar", "controller"=>"test_case_test/test", "action"=>"test_params"}, ::JSON.parse(@response.body)) + assert_equal({ "bar"=>"an bar", "controller"=>"test_case_test/test", "action"=>"test_params" }, ::JSON.parse(@response.body)) end %w(controller response request).each do |variable| @@ -1208,7 +1208,7 @@ class RoutingDefaultsTest < ActionController::TestCase end def test_route_option_can_be_passed_via_process - get :post, params: { id: 1, bucket_type: "post"} + get :post, params: { id: 1, bucket_type: "post" } assert_equal "/posts/1", @response.body end |