end
end
- def test_empty_tag_invalid
- tag = ChangesetTag.new
- assert_not tag.valid?, "Empty tag should be invalid"
+ def test_orphaned_tag_invalid
+ tag = create(:changeset_tag)
+ tag.changeset = nil
+ assert_not tag.valid?, "Orphaned tag should be invalid"
assert_predicate tag.errors[:changeset], :any?
end
assert_predicate tag.errors[:v], :any?
end
- def test_empty_node_tag_invalid
- tag = NodeTag.new
- assert_not tag.valid?, "Empty tag should be invalid"
+ def test_orphaned_node_tag_invalid
+ tag = create(:node_tag)
+ tag.node = nil
+ assert_not tag.valid?, "Orphaned tag should be invalid"
assert_predicate tag.errors[:node], :any?
end
assert_predicate tag.errors[:v], :any?
end
- def test_empty_tag_invalid
- tag = OldNodeTag.new
- assert_not tag.valid?, "Empty tag should be invalid"
+ def test_orphaned_tag_invalid
+ tag = create(:old_node_tag)
+ tag.old_node = nil
+ assert_not tag.valid?, "Orphaned tag should be invalid"
assert_predicate tag.errors[:old_node], :any?
end
assert_predicate tag.errors[:v], :any?
end
- def test_empty_tag_invalid
- tag = OldRelationTag.new
- assert_not tag.valid?, "Empty tag should be invalid"
+ def test_orphaned_tag_invalid
+ tag = create(:old_relation_tag)
+ tag.old_relation = nil
+ assert_not tag.valid?, "Orphaned tag should be invalid"
assert_predicate tag.errors[:old_relation], :any?
end
assert_predicate tag.errors[:v], :any?
end
- def test_empty_tag_invalid
- tag = OldWayTag.new
- assert_not tag.valid?, "Empty tag should be invalid"
+ def test_orphaned_tag_invalid
+ tag = create(:old_way_tag)
+ tag.old_way = nil
+ assert_not tag.valid?, "Orphaned tag should be invalid"
assert_predicate tag.errors[:old_way], :any?
end
assert_predicate tag.errors[:v], :any?
end
- def test_empty_tag_invalid
- tag = RelationTag.new
- assert_not tag.valid?, "Empty relation tag should be invalid"
+ def test_orphaned_tag_invalid
+ tag = create(:relation_tag)
+ tag.relation = nil
+ assert_not tag.valid?, "Orphaned tag should be invalid"
assert_predicate tag.errors[:relation], :any?
end
assert_predicate tag.errors[:v], :any?
end
- def test_empty_tag_invalid
- tag = WayTag.new
- assert_not tag.valid?, "Empty way tag should be invalid"
+ def test_orphaned_tag_invalid
+ tag = create(:way_tag)
+ tag.way = nil
+ assert_not tag.valid?, "Orphaned tag should be invalid"
assert_predicate tag.errors[:way], :any?
end