X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..f73b7205f42ac690ee659f4a92d86a56138a7ea2:/test/models/old_relation_tag_test.rb diff --git a/test/models/old_relation_tag_test.rb b/test/models/old_relation_tag_test.rb index d920f91da..d31d0e64e 100644 --- a/test/models/old_relation_tag_test.rb +++ b/test/models/old_relation_tag_test.rb @@ -20,21 +20,21 @@ class OldRelationTagTest < ActiveSupport::TestCase def test_length_key_invalid tag = create(:old_relation_tag) tag.k = "k" * 256 - assert_not tag.valid?, "Key should be too long" + assert_not_predicate tag, :valid?, "Key should be too long" assert_predicate tag.errors[:k], :any? end def test_length_value_invalid tag = create(:old_relation_tag) tag.v = "v" * 256 - assert_not tag.valid?, "Value should be too long" + assert_not_predicate tag, :valid?, "Value should be too long" assert_predicate tag.errors[:v], :any? end def test_orphaned_tag_invalid tag = create(:old_relation_tag) tag.old_relation = nil - assert_not tag.valid?, "Orphaned tag should be invalid" + assert_not_predicate tag, :valid?, "Orphaned tag should be invalid" assert_predicate tag.errors[:old_relation], :any? end @@ -42,7 +42,7 @@ class OldRelationTagTest < ActiveSupport::TestCase existing = create(:old_relation_tag) tag = build(:old_relation_tag, :old_relation => existing.old_relation, :version => existing.version, :k => existing.k, :v => existing.v) assert_predicate tag, :new_record? - assert_not tag.valid? + assert_not_predicate tag, :valid? assert_raise(ActiveRecord::RecordInvalid) { tag.save! } assert_predicate tag, :new_record? end