]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/way_tag_test.rb
Merge remote-tracking branch 'upstream/pull/2079'
[rails.git] / test / models / way_tag_test.rb
index ae8be73b3f5183587e3e036b7e47f99546a5aac6..990a4362789d2ccfb57c9c20e7e966886e70a8f5 100644 (file)
@@ -1,8 +1,6 @@
 require "test_helper"
 
 class WayTagTest < ActiveSupport::TestCase
-  api_fixtures
-
   def test_length_key_valid
     tag = create(:way_tag)
     (0..255).each do |i|
@@ -22,20 +20,20 @@ class WayTagTest < ActiveSupport::TestCase
   def test_length_key_invalid
     tag = create(:way_tag)
     tag.k = "k" * 256
-    assert !tag.valid?, "Key should be too long"
+    assert_not tag.valid?, "Key should be too long"
     assert tag.errors[:k].any?
   end
 
   def test_length_value_invalid
     tag = create(:way_tag)
     tag.v = "v" * 256
-    assert !tag.valid?, "Value should be too long"
+    assert_not tag.valid?, "Value should be too long"
     assert tag.errors[:v].any?
   end
 
   def test_empty_tag_invalid
     tag = WayTag.new
-    assert !tag.valid?, "Empty way tag should be invalid"
+    assert_not tag.valid?, "Empty way tag should be invalid"
     assert tag.errors[:way].any?
   end
 
@@ -46,7 +44,7 @@ class WayTagTest < ActiveSupport::TestCase
     tag.k = existing.k
     tag.v = existing.v
     assert tag.new_record?
-    assert !tag.valid?
+    assert_not tag.valid?
     assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
     assert tag.new_record?
   end