Avoid use of deprecated methods on error objects
[rails.git] / test / unit / old_way_tag_test.rb
index 4945c14979392cf43092cac2983f4640f5f201e8..3282fc47381a20fd8448c569ef4188d57ad81873 100644 (file)
@@ -39,7 +39,7 @@ class WayTagTest < ActiveSupport::TestCase
       tag.k = i
       tag.v = "v"
       assert !tag.valid?, "Key should be too long"
-      assert tag.errors.invalid?(:k)
+      assert tag.errors[:k].any?
     end
   end
   
@@ -51,14 +51,14 @@ class WayTagTest < ActiveSupport::TestCase
       tag.k = "k"
       tag.v = i
       assert !tag.valid?, "Value should be too long"
-      assert tag.errors.invalid?(:v)
+      assert tag.errors[:v].any?
     end
   end
   
   def test_empty_node_tag_invalid
     tag = OldNodeTag.new
     assert !tag.valid?, "Empty tag should be invalid"
-    assert tag.errors.invalid?(:id)
+    assert tag.errors[:id].any?
   end
   
   def test_uniqueness