Avoid use of deprecated methods on error objects
[rails.git] / test / unit / way_tag_test.rb
index f5a931f6a322389744c93ff0e22254ba8ab36616..5ce08815924728f0779ced24be9397d6b8c7c70d 100644 (file)
@@ -36,7 +36,7 @@ class WayTagTest < ActiveSupport::TestCase
       tag.k = i
       tag.v = "v"
       assert !tag.valid?, "Key #{i} should be too long"
-      assert tag.errors.invalid?(:k)
+      assert tag.errors[:k].any?
     end
   end
   
@@ -47,14 +47,14 @@ class WayTagTest < ActiveSupport::TestCase
       tag.k = "k"
       tag.v = i
       assert !tag.valid?, "Value #{i} should be too long"
-      assert tag.errors.invalid?(:v)
+      assert tag.errors[:v].any?
     end
   end
   
   def test_empty_tag_invalid
     tag = WayTag.new
     assert !tag.valid?, "Empty way tag should be invalid"
-    assert tag.errors.invalid?(:id)
+    assert tag.errors[:id].any?
   end
   
   def test_uniqueness