Fix rubocop warnings
[rails.git] / test / models / old_way_tag_test.rb
index 07bdfbca87f4355828ceca94a0b9224ab323da3f..b8757d572e61f1d55cc2d7874dd668d4fa8bc86e 100644 (file)
@@ -1,24 +1,24 @@
-require 'test_helper'
+require "test_helper"
 
 class OldWayTagTest < ActiveSupport::TestCase
   api_fixtures
-  
+
   def test_tag_count
-    assert_equal 12, OldWayTag.count
+    assert_equal 13, OldWayTag.count
   end
-  
+
   def test_length_key_valid
     key = "k"
     (0..255).each do |i|
       tag = OldWayTag.new
       tag.way_id = way_tags(:t1).way_id
       tag.version = 1
-      tag.k = key*i
+      tag.k = key * i
       tag.v = "v"
       assert tag.valid?
     end
   end
-  
+
   def test_length_value_valid
     val = "v"
     (0..255).each do |i|
@@ -26,13 +26,13 @@ class OldWayTagTest < ActiveSupport::TestCase
       tag.way_id = way_tags(:t1).way_id
       tag.version = 1
       tag.k = "k"
-      tag.v = val*i
+      tag.v = val * i
       assert tag.valid?
     end
   end
-  
+
   def test_length_key_invalid
-    ["k"*256].each do |i|
+    ["k" * 256].each do |i|
       tag = OldWayTag.new
       tag.way_id = way_tags(:t1).way_id
       tag.version = 1
@@ -42,9 +42,9 @@ class OldWayTagTest < ActiveSupport::TestCase
       assert tag.errors[:k].any?
     end
   end
-  
+
   def test_length_value_invalid
-    ["k"*256].each do |i|
+    ["k" * 256].each do |i|
       tag = OldWayTag.new
       tag.way_id = way_tags(:t1).way_id
       tag.version = 1
@@ -54,13 +54,13 @@ class OldWayTagTest < ActiveSupport::TestCase
       assert tag.errors[:v].any?
     end
   end
-  
+
   def test_empty_tag_invalid
     tag = OldWayTag.new
     assert !tag.valid?, "Empty tag should be invalid"
     assert tag.errors[:old_way].any?
   end
-  
+
   def test_uniqueness
     tag = OldWayTag.new
     tag.way_id = way_tags(:t1).way_id
@@ -69,7 +69,7 @@ class OldWayTagTest < ActiveSupport::TestCase
     tag.v = way_tags(:t1).v
     assert tag.new_record?
     assert !tag.valid?
-    assert_raise(ActiveRecord::RecordInvalid) {tag.save!}
+    assert_raise(ActiveRecord::RecordInvalid) { tag.save! }
     assert tag.new_record?
   end
 end