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