aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-01-21 17:28:18 -0500
committerJon Moss <me@jonathanmoss.me>2016-01-21 17:28:18 -0500
commit627f736cc0a1a7b32e67303b92b963d4b6d9e68c (patch)
treecea7ae0af777964f584cb4581f5c1013c9c19409 /actionpack/test
parent06397336b2c9b1de9462f1baa8075573fd3709dd (diff)
downloadrails-627f736cc0a1a7b32e67303b92b963d4b6d9e68c.tar.gz
rails-627f736cc0a1a7b32e67303b92b963d4b6d9e68c.tar.bz2
rails-627f736cc0a1a7b32e67303b92b963d4b6d9e68c.zip
Fix `ActionController::Parameters#==` bug
See bug #21032.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/parameters/accessors_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/parameters/accessors_test.rb b/actionpack/test/controller/parameters/accessors_test.rb
index a8f4d877a6..bd43ff7697 100644
--- a/actionpack/test/controller/parameters/accessors_test.rb
+++ b/actionpack/test/controller/parameters/accessors_test.rb
@@ -128,4 +128,10 @@ class ParametersAccessorsTest < ActiveSupport::TestCase
assert_not @params.values_at(:person).first.permitted?
assert_not @params[:person].values_at(:name).first.permitted?
end
+
+ test "equality with another hash works" do
+ hash1 = { foo: :bar }
+ params1 = ActionController::Parameters.new(hash1)
+ assert(params1 == hash1)
+ end
end