require File.dirname(__FILE__) + '/../test_helper'
class WayTagTest < Test::Unit::TestCase
- fixtures :current_way_tags
- set_fixture_class :current_way_tags => WayTag
+ api_fixtures
def test_way_tag_count
assert_equal 3, WayTag.count
tag.k = "k"
tag.v = i
assert !tag.valid?, "Value #{i} should be too long"
+ assert tag.errors.invalid?(:v)
end
end
assert tag.errors.invalid?(:id)
end
- def test_uniquness
+ def test_uniqueness
tag = WayTag.new
tag.id = current_way_tags(:t1).id
tag.k = current_way_tags(:t1).k