diff options
author | Igor Kasyanchuk <igorkasyanchuk@gmail.com> | 2016-08-10 00:37:27 +0300 |
---|---|---|
committer | Igor Kasyanchuk <igorkasyanchuk@gmail.com> | 2016-08-10 00:37:27 +0300 |
commit | d6339275a063ac7a6044dbc1a67fe38561e9aee1 (patch) | |
tree | c657c2b26dfe24abe3dadb7cdd7d64c604f024a4 /actionpack/test/controller/parameters | |
parent | 67d0c9ee93100dbdcafd20b0632e5bef6735888e (diff) | |
download | rails-d6339275a063ac7a6044dbc1a67fe38561e9aee1.tar.gz rails-d6339275a063ac7a6044dbc1a67fe38561e9aee1.tar.bz2 rails-d6339275a063ac7a6044dbc1a67fe38561e9aee1.zip |
Show unpermitted parameters as symbols in logs (so they could be copy-pasted to the code)
Diffstat (limited to 'actionpack/test/controller/parameters')
-rw-r--r-- | actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb b/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb index bf2c3d1ed2..f1350101fc 100644 --- a/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb +++ b/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb @@ -14,7 +14,7 @@ class LogOnUnpermittedParamsTest < ActiveSupport::TestCase params = ActionController::Parameters.new( book: { pages: 65 }, fishing: "Turnips") - assert_logged("Unpermitted parameter: fishing") do + assert_logged("Unpermitted parameter: :fishing") do params.permit(book: [:pages]) end end @@ -24,7 +24,7 @@ class LogOnUnpermittedParamsTest < ActiveSupport::TestCase fishing: "Turnips", car: "Mersedes") - assert_logged("Unpermitted parameters: fishing, car") do + assert_logged("Unpermitted parameters: :fishing, :car") do params.permit(book: [:pages]) end end @@ -32,7 +32,7 @@ class LogOnUnpermittedParamsTest < ActiveSupport::TestCase test "logs on unexpected nested param" do params = ActionController::Parameters.new( book: { pages: 65, title: "Green Cats and where to find then." }) - assert_logged("Unpermitted parameter: title") do + assert_logged("Unpermitted parameter: :title") do params.permit(book: [:pages]) end end @@ -40,7 +40,7 @@ class LogOnUnpermittedParamsTest < ActiveSupport::TestCase test "logs on unexpected nested params" do params = ActionController::Parameters.new( book: { pages: 65, title: "Green Cats and where to find then.", author: "G. A. Dog" }) - assert_logged("Unpermitted parameters: title, author") do + assert_logged("Unpermitted parameters: :title, :author") do params.permit(book: [:pages]) end end |