It's really the upper and lower boundaries that we want to check,
and it's reasonable to assume all the intermediate values will work
fine if the boundary values are tested.
This also saves about 75% of the time taken and almost 85% of the
assertions when running all the model tests.
changeset = create(:changeset)
key = "k"
changeset = create(:changeset)
key = "k"
tag = ChangesetTag.new
tag.changeset_id = changeset.id
tag.k = key * i
tag = ChangesetTag.new
tag.changeset_id = changeset.id
tag.k = key * i
changeset = create(:changeset)
val = "v"
changeset = create(:changeset)
val = "v"
tag = ChangesetTag.new
tag.changeset_id = changeset.id
tag.k = "k"
tag = ChangesetTag.new
tag.changeset_id = changeset.id
tag.k = "k"
end
def test_utf8_roundtrip
end
def test_utf8_roundtrip
assert_message_ok("c", i)
assert_message_ok(EURO, i)
end
assert_message_ok("c", i)
assert_message_ok(EURO, i)
end
class NodeTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:node_tag)
class NodeTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:node_tag)
tag.k = "k" * i
assert tag.valid?
end
tag.k = "k" * i
assert tag.valid?
end
def test_length_value_valid
tag = create(:node_tag)
def test_length_value_valid
tag = create(:node_tag)
tag.v = "v" * i
assert tag.valid?
end
tag.v = "v" * i
assert tag.valid?
end
class OldNodeTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:old_node_tag)
class OldNodeTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:old_node_tag)
tag.k = "k" * i
assert tag.valid?
end
tag.k = "k" * i
assert tag.valid?
end
def test_length_value_valid
tag = create(:old_node_tag)
def test_length_value_valid
tag = create(:old_node_tag)
tag.v = "v" * i
assert tag.valid?
end
tag.v = "v" * i
assert tag.valid?
end
class OldRelationTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:old_relation_tag)
class OldRelationTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:old_relation_tag)
tag.k = "k" * i
assert tag.valid?
end
tag.k = "k" * i
assert tag.valid?
end
def test_length_value_valid
tag = create(:old_relation_tag)
def test_length_value_valid
tag = create(:old_relation_tag)
tag.v = "v" * i
assert tag.valid?
end
tag.v = "v" * i
assert tag.valid?
end
class OldWayTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:old_way_tag)
class OldWayTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:old_way_tag)
tag.k = "k" * i
assert tag.valid?
end
tag.k = "k" * i
assert tag.valid?
end
def test_length_value_valid
tag = create(:old_way_tag)
def test_length_value_valid
tag = create(:old_way_tag)
tag.v = "v" * i
assert tag.valid?
end
tag.v = "v" * i
assert tag.valid?
end
class RelationTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:relation_tag)
class RelationTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:relation_tag)
tag.k = "k" * i
assert tag.valid?
end
tag.k = "k" * i
assert tag.valid?
end
def test_length_value_valid
tag = create(:relation_tag)
def test_length_value_valid
tag = create(:relation_tag)
tag.v = "v" * i
assert tag.valid?
end
tag.v = "v" * i
assert tag.valid?
end
def test_check_valid_length
key = "k"
val = "v"
def test_check_valid_length
key = "k"
val = "v"
up = UserPreference.new
up.user = create(:user)
up.k = key * i
up = UserPreference.new
up.user = create(:user)
up.k = key * i
class WayTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:way_tag)
class WayTagTest < ActiveSupport::TestCase
def test_length_key_valid
tag = create(:way_tag)
tag.k = "k" * i
assert tag.valid?
end
tag.k = "k" * i
assert tag.valid?
end
def test_length_value_valid
tag = create(:way_tag)
def test_length_value_valid
tag = create(:way_tag)
tag.v = "v" * i
assert tag.valid?
end
tag.v = "v" * i
assert tag.valid?
end