From 3da358ea83b86368021d6f289627d0682d24d30b Mon Sep 17 00:00:00 2001
From: Ryuta Kamizono <kamipo@gmail.com>
Date: Fri, 21 Dec 2018 00:16:39 +0900
Subject: Remove remaining tests for `Hash#transform_keys` and
 `Hash#transform_keys!`

Follow up #34761.
---
 activesupport/test/core_ext/hash_ext_test.rb | 27 ---------------------------
 1 file changed, 27 deletions(-)

(limited to 'activesupport/test')

diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index f4f0dd6b31..afbc90f6d7 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -31,8 +31,6 @@ class HashExtTest < ActiveSupport::TestCase
 
   def test_methods
     h = {}
-    assert_respond_to h, :transform_keys
-    assert_respond_to h, :transform_keys!
     assert_respond_to h, :deep_transform_keys
     assert_respond_to h, :deep_transform_keys!
     assert_respond_to h, :symbolize_keys
@@ -49,18 +47,6 @@ class HashExtTest < ActiveSupport::TestCase
     assert_respond_to h, :except!
   end
 
-  def test_transform_keys
-    assert_equal @upcase_strings, @strings.transform_keys { |key| key.to_s.upcase }
-    assert_equal @upcase_strings, @symbols.transform_keys { |key| key.to_s.upcase }
-    assert_equal @upcase_strings, @mixed.transform_keys { |key| key.to_s.upcase }
-  end
-
-  def test_transform_keys_not_mutates
-    transformed_hash = @mixed.dup
-    transformed_hash.transform_keys { |key| key.to_s.upcase }
-    assert_equal @mixed, transformed_hash
-  end
-
   def test_deep_transform_keys
     assert_equal @nested_upcase_strings, @nested_symbols.deep_transform_keys { |key| key.to_s.upcase }
     assert_equal @nested_upcase_strings, @nested_strings.deep_transform_keys { |key| key.to_s.upcase }
@@ -76,19 +62,6 @@ class HashExtTest < ActiveSupport::TestCase
     assert_equal @nested_mixed, transformed_hash
   end
 
-  def test_transform_keys!
-    assert_equal @upcase_strings, @symbols.dup.transform_keys! { |key| key.to_s.upcase }
-    assert_equal @upcase_strings, @strings.dup.transform_keys! { |key| key.to_s.upcase }
-    assert_equal @upcase_strings, @mixed.dup.transform_keys! { |key| key.to_s.upcase }
-  end
-
-  def test_transform_keys_with_bang_mutates
-    transformed_hash = @mixed.dup
-    transformed_hash.transform_keys! { |key| key.to_s.upcase }
-    assert_equal @upcase_strings, transformed_hash
-    assert_equal({ :a => 1, "b" => 2 }, @mixed)
-  end
-
   def test_deep_transform_keys!
     assert_equal @nested_upcase_strings, @nested_symbols.deep_dup.deep_transform_keys! { |key| key.to_s.upcase }
     assert_equal @nested_upcase_strings, @nested_strings.deep_dup.deep_transform_keys! { |key| key.to_s.upcase }
-- 
cgit v1.2.3