]> git.openstreetmap.org Git - rails.git/blobdiff - test/unit/relation_tag_test.rb
Avoid use of deprecated methods on error objects
[rails.git] / test / unit / relation_tag_test.rb
index 81bcd60acf549f452d5cad3265add0e1df48b0fc..7c703cf27e27e6858883a8b8cb38c97629b58dc7 100644 (file)
@@ -36,7 +36,7 @@ class RelationTagTest < 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 RelationTagTest < 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 = RelationTag.new
     assert !tag.valid?, "Empty relation tag should be invalid"
-    assert tag.errors.invalid?(:id)
+    assert tag.errors[:id].any?
   end
   
   def test_uniquness