X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/34e3e51456774127d43408b7ab65c24f41373f62..e1cac818b128f71482a495b51ee30b7812a53dc2:/test/models/tracetag_test.rb diff --git a/test/models/tracetag_test.rb b/test/models/tracetag_test.rb index d5849e37f..a13d41e4a 100644 --- a/test/models/tracetag_test.rb +++ b/test/models/tracetag_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require "test_helper" class TracetagTest < ActiveSupport::TestCase api_fixtures @@ -9,19 +9,19 @@ class TracetagTest < ActiveSupport::TestCase def test_validations tracetag_valid({}) - tracetag_valid({:tag => nil}, false) - tracetag_valid({:tag => ''}, false) - tracetag_valid({:tag => 'a'}) - tracetag_valid({:tag => 'a'*255}) - tracetag_valid({:tag => 'a'*256}, false) - tracetag_valid({:tag => 'a/b'}, false) - tracetag_valid({:tag => 'a;b'}, false) - tracetag_valid({:tag => 'a.b'}, false) - tracetag_valid({:tag => 'a,b'}, false) - tracetag_valid({:tag => 'a?b'}, false) + tracetag_valid({ :tag => nil }, false) + tracetag_valid({ :tag => "" }, false) + tracetag_valid(:tag => "a") + tracetag_valid(:tag => "a" * 255) + tracetag_valid({ :tag => "a" * 256 }, false) + tracetag_valid({ :tag => "a/b" }, false) + tracetag_valid({ :tag => "a;b" }, false) + tracetag_valid({ :tag => "a.b" }, false) + tracetag_valid({ :tag => "a,b" }, false) + tracetag_valid({ :tag => "a?b" }, false) end -private + private def tracetag_valid(attrs, result = true) entry = Tracetag.new(gpx_file_tags(:first_trace_1).attributes)