aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/cases/serializers/json_serialization_test.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/activemodel/test/cases/serializers/json_serialization_test.rb b/activemodel/test/cases/serializers/json_serialization_test.rb
index fd4d068354..9134c4980c 100644
--- a/activemodel/test/cases/serializers/json_serialization_test.rb
+++ b/activemodel/test/cases/serializers/json_serialization_test.rb
@@ -157,11 +157,8 @@ class JsonSerializationTest < ActiveModel::TestCase
test "as_json should keep the default order in the hash" do
json = @contact.as_json
- keys = json.keys
- %w(name age created_at awesome preferences).each_with_index do |field, index|
- assert_equal keys.index(field), index
- end
+ assert_equal %w(name age created_at awesome preferences), json.keys
end
test "from_json should work without a root (class attribute)" do