Avoid use of deprecated methods on error objects
[rails.git] / test / unit / old_relation_tag_test.rb
index ece55d8d5da69891f7b876be86d2f46ea3176e23..f6ac38428874b229e5245b8c9a60ae9973753653 100644 (file)
@@ -39,7 +39,7 @@ class OldRelationTagTest < 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 OldRelationTagTest < 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 = OldRelationTag.new
     assert !tag.valid?, "Empty tag should be invalid"
-    assert tag.errors.invalid?(:id)
+    assert tag.errors[:id].any?
   end
   
   def test_uniqueness