]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/old_node_test.rb
Replace fixtures with factory for relation_tags
[rails.git] / test / models / old_node_test.rb
index 6d25d766731c9d3e0c09dc73f5180d4fa1e4b686..a4c317c02ab60a5d8c540f8931d5f41852fd54d7 100644 (file)
@@ -90,7 +90,7 @@ class OldNodeTest < ActiveSupport::TestCase
     node = nodes(:node_with_versions_v3)
     tags = OldNode.find(node.id).old_tags.order(:k)
     assert_equal 3, tags.count
     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|
+    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
       assert_equal taglist_v3[i].k, tags[i].k
       assert_equal taglist_v3[i].v, tags[i].v
     end
@@ -98,7 +98,7 @@ class OldNodeTest < ActiveSupport::TestCase
     node = nodes(:node_with_versions_v4)
     tags = OldNode.find(node.id).old_tags.order(:k)
     assert_equal 2, tags.count
     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|
+    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
       assert_equal taglist_v4[i].k, tags[i].k
       assert_equal taglist_v4[i].v, tags[i].v
     end