node = current_nodes(:node_with_versions)
taglist = create_list(:node_tag, 2, :node => node)
tags = Node.find(node.id).node_tags.order(:k)
- assert_equal 2, tags.count
+ assert_equal taglist.count, tags.count
taglist.sort_by!(&:k).each_index do |i|
assert_equal taglist[i].k, tags[i].k
assert_equal taglist[i].v, tags[i].v
node = current_nodes(:node_with_versions)
taglist = create_list(:node_tag, 2, :node => node)
tags = Node.find(node.id).tags
- assert_equal 2, tags.size
+ assert_equal taglist.count, tags.count
taglist.each do |tag|
assert_equal tag.v, tags[tag.k]
end
node = nodes(:node_with_versions_v3)
tags = OldNode.find(node.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
node = nodes(:node_with_versions_v4)
tags = OldNode.find(node.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
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
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
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
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
way = ways(:way_with_versions_v3)
tags = OldWay.find(way.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
way = ways(:way_with_versions_v4)
tags = OldWay.find(way.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
way = ways(:way_with_versions_v3)
tags = OldWay.find(way.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
way = ways(:way_with_versions_v4)
tags = OldWay.find(way.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
taglist = create_list(:relation_tag, 2, :relation => relation)
tags = Relation.find(relation.id).relation_tags.order(:k)
- assert_equal 2, tags.count
+ assert_equal taglist.count, tags.count
taglist.sort_by!(&:k).each_index do |i|
assert_equal taglist[i].k, tags[i].k
assert_equal taglist[i].v, tags[i].v
taglist = create_list(:relation_tag, 2, :relation => relation)
tags = Relation.find(relation.id).tags
- assert_equal 2, tags.size
+ assert_equal taglist.count, tags.count
taglist.each do |tag|
assert_equal tag.v, tags[tag.k]
end
way = current_ways(:way_with_versions)
taglist = create_list(:way_tag, 2, :way => way)
tags = Way.find(way.id).way_tags.order(:k)
- assert_equal 2, tags.count
+ assert_equal taglist.count, tags.count
taglist.sort_by!(&:k).each_index do |i|
assert_equal taglist[i].k, tags[i].k
assert_equal taglist[i].v, tags[i].v
way = current_ways(:way_with_versions)
taglist = create_list(:way_tag, 2, :way => way)
tags = Way.find(way.id).tags
- assert_equal 2, tags.size
+ assert_equal taglist.count, tags.count
taglist.each do |tag|
assert_equal tag.v, tags[tag.k]
end