]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/old_relation_test.rb
User factory for uniqueness tests
[rails.git] / test / models / old_relation_test.rb
index 8b7b5e1f81fcef18936100e3acabdfd9ea58fb17..d2aa4b6b6d8b78f77c95ab463d6e4b7e0e64ac6e 100644 (file)
@@ -21,7 +21,7 @@ class OldRelationTest < ActiveSupport::TestCase
 
     relation = relations(:relation_with_versions_v3)
     tags = OldRelation.find(relation.id).old_tags.order(:k)
-    assert_equal 3, tags.count
+    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
@@ -29,7 +29,7 @@ class OldRelationTest < ActiveSupport::TestCase
 
     relation = relations(:relation_with_versions_v4)
     tags = OldRelation.find(relation.id).old_tags.order(:k)
-    assert_equal 2, tags.count
+    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
@@ -114,14 +114,14 @@ class OldRelationTest < ActiveSupport::TestCase
 
     relation = relations(:relation_with_versions_v3)
     tags = OldRelation.find(relation.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
 
     relation = relations(:relation_with_versions_v4)
     tags = OldRelation.find(relation.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