X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/acb7f440690b1f773f71ded256f3986a5606b334..60e1895da18f50de51d361d80ee515de2b53e2f7:/test/models/old_node_test.rb?ds=sidebyside diff --git a/test/models/old_node_test.rb b/test/models/old_node_test.rb index 6d25d7667..d7e363edb 100644 --- a/test/models/old_node_test.rb +++ b/test/models/old_node_test.rb @@ -89,16 +89,16 @@ class OldNodeTest < ActiveSupport::TestCase node = nodes(:node_with_versions_v3) tags = OldNode.find(node.id).old_tags.order(:k) - assert_equal 3, tags.count - taglist_v3.sort_by(&:k).each_index do |i| + assert_equal taglist_v3.count, tags.count + taglist_v3.sort_by!(&:k).each_index do |i| assert_equal taglist_v3[i].k, tags[i].k assert_equal taglist_v3[i].v, tags[i].v end node = nodes(:node_with_versions_v4) tags = OldNode.find(node.id).old_tags.order(:k) - assert_equal 2, tags.count - taglist_v4.sort_by(&:k).each_index do |i| + assert_equal taglist_v4.count, tags.count + taglist_v4.sort_by!(&:k).each_index do |i| assert_equal taglist_v4[i].k, tags[i].k assert_equal taglist_v4[i].v, tags[i].v end @@ -118,14 +118,14 @@ class OldNodeTest < ActiveSupport::TestCase node = nodes(:node_with_versions_v3) tags = OldNode.find(node.id).tags - assert_equal 3, tags.size + assert_equal taglist_v3.count, tags.count taglist_v3.each do |tag| assert_equal tag.v, tags[tag.k] end node = nodes(:node_with_versions_v4) tags = OldNode.find(node.id).tags - assert_equal 2, tags.size + assert_equal taglist_v4.count, tags.count taglist_v4.each do |tag| assert_equal tag.v, tags[tag.k] end