From 6398bdc2cead052a726c52b9a13f3643a26ae31e Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 7 Jul 2025 04:21:00 +0300 Subject: [PATCH] Assert that hashes are equal without iterating over items --- test/controllers/api/relations_controller_test.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/controllers/api/relations_controller_test.rb b/test/controllers/api/relations_controller_test.rb index 0d0624518..3c26715d0 100644 --- a/test/controllers/api/relations_controller_test.rb +++ b/test/controllers/api/relations_controller_test.rb @@ -1159,12 +1159,7 @@ module Api a_tags = get_tags_as_hash(a) b_tags = get_tags_as_hash(b) - assert_equal a_tags.keys, b_tags.keys, "Tag keys should be identical." - a_tags.each do |k, v| - assert_equal v, b_tags[k], - "Tags which were not altered should be the same. " \ - "#{a_tags.inspect} != #{b_tags.inspect}" - end + assert_equal a_tags, b_tags, "Tags should be identical." end ## -- 2.39.5