diff options
author | Akira Matsuda <ronnie@dio.jp> | 2016-12-26 11:04:41 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2016-12-26 11:04:56 +0900 |
commit | a46b2f8911c5730c8c56d487b65f7c5627d334ee (patch) | |
tree | 6ec9e97e0fc92e754daae843abaed7a11a281775 /actionpack | |
parent | e813a9f8605a5cbb34d3ee218f7fed49c98d5378 (diff) | |
download | rails-a46b2f8911c5730c8c56d487b65f7c5627d334ee.tar.gz rails-a46b2f8911c5730c8c56d487b65f7c5627d334ee.tar.bz2 rails-a46b2f8911c5730c8c56d487b65f7c5627d334ee.zip |
assert_equal takes expectation first
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/params_wrapper_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/request/test_request_test.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/controller/params_wrapper_test.rb b/actionpack/test/controller/params_wrapper_test.rb index 46a2ab8ccf..098d689a97 100644 --- a/actionpack/test/controller/params_wrapper_test.rb +++ b/actionpack/test/controller/params_wrapper_test.rb @@ -50,7 +50,7 @@ class ParamsWrapperTest < ActionController::TestCase with_default_wrapper_options do @request.env["CONTENT_TYPE"] = "application/json" post :parse, params: { "username" => "sikachu" } - assert_equal @request.filtered_parameters, "controller" => "params_wrapper_test/users", "action" => "parse", "username" => "sikachu", "user" => { "username" => "sikachu" } + assert_equal({"controller" => "params_wrapper_test/users", "action" => "parse", "username" => "sikachu", "user" => { "username" => "sikachu" }}, @request.filtered_parameters) end end diff --git a/actionpack/test/controller/request/test_request_test.rb b/actionpack/test/controller/request/test_request_test.rb index 49a19df4df..b67ae72c0a 100644 --- a/actionpack/test/controller/request/test_request_test.rb +++ b/actionpack/test/controller/request/test_request_test.rb @@ -17,8 +17,8 @@ class ActionController::TestRequestTest < ActionController::TestCase @request.set_header "CONTENT_TYPE", "application/json" @request.assign_parameters(@routes, "test", "create", non_ascii_parameters, "/test", [:data, :controller, :action]) - assert_equal(@request.get_header("CONTENT_LENGTH"), - StringIO.new(non_ascii_parameters.to_json).length.to_s) + assert_equal(StringIO.new(non_ascii_parameters.to_json).length.to_s, + @request.get_header("CONTENT_LENGTH")) end ActionDispatch::Session::AbstractStore::DEFAULT_OPTIONS.each_key do |option| |