X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/34e3e51456774127d43408b7ab65c24f41373f62..898c1475baaac883442fdf32d16379f1b737052c:/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)