Avoid use of deprecated methods on error objects
[rails.git] / test / unit / node_tag_test.rb
index cfe0b57f22b26ae8a5d90402c2fd4d9deecbec5f..c4ebd2c6e8253edeef14f785eb99c5e4c21ecb59 100644 (file)
@@ -46,7 +46,7 @@ class NodeTagTest < 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
   
@@ -57,14 +57,14 @@ class NodeTagTest < 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 = NodeTag.new
     assert !tag.valid?, "Empty tag should be invalid"
-    assert tag.errors.invalid?(:id)
+    assert tag.errors[:id].any?
   end
   
   def test_uniqueness