Fix bogus test class names
[rails.git] / test / unit / old_way_tag_test.rb
index 3282fc47381a20fd8448c569ef4188d57ad81873..107111b1085f7e7b6525e1b09d4fce8a7e5ba40b 100644 (file)
@@ -1,17 +1,17 @@
 require File.dirname(__FILE__) + '/../test_helper'
 
-class WayTagTest < ActiveSupport::TestCase
+class OldWayTagTest < ActiveSupport::TestCase
   api_fixtures
   
   def test_tag_count
-    assert_equal 3, OldWayTag.count
+    assert_equal 7, OldWayTag.count
   end
   
   def test_length_key_valid
     key = "k"
     (0..255).each do |i|
       tag = OldWayTag.new
-      tag.id = way_tags(:t1).id
+      tag.way_id = way_tags(:t1).way_id
       tag.version = 1
       tag.k = key*i
       tag.v = "v"
@@ -23,7 +23,7 @@ class WayTagTest < ActiveSupport::TestCase
     val = "v"
     (0..255).each do |i|
       tag = OldWayTag.new
-      tag.id = way_tags(:t1).id
+      tag.way_id = way_tags(:t1).way_id
       tag.version = 1
       tag.k = "k"
       tag.v = val*i
@@ -34,7 +34,7 @@ class WayTagTest < ActiveSupport::TestCase
   def test_length_key_invalid
     ["k"*256].each do |i|
       tag = OldWayTag.new
-      tag.id = way_tags(:t1).id
+      tag.way_id = way_tags(:t1).way_id
       tag.version = 1
       tag.k = i
       tag.v = "v"
@@ -46,7 +46,7 @@ class WayTagTest < ActiveSupport::TestCase
   def test_length_value_invalid
     ["k"*256].each do |i|
       tag = OldWayTag.new
-      tag.id = way_tags(:t1).id
+      tag.way_id = way_tags(:t1).way_id
       tag.version = 1
       tag.k = "k"
       tag.v = i
@@ -55,15 +55,15 @@ class WayTagTest < ActiveSupport::TestCase
     end
   end
   
-  def test_empty_node_tag_invalid
-    tag = OldNodeTag.new
+  def test_empty_tag_invalid
+    tag = OldWayTag.new
     assert !tag.valid?, "Empty tag should be invalid"
-    assert tag.errors[:id].any?
+    assert tag.errors[:old_way].any?
   end
   
   def test_uniqueness
     tag = OldWayTag.new
-    tag.id = way_tags(:t1).id
+    tag.way_id = way_tags(:t1).way_id
     tag.version = way_tags(:t1).version
     tag.k = way_tags(:t1).k
     tag.v = way_tags(:t1).v