]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/user_test.rb
Probit control characters in user names
[rails.git] / test / models / user_test.rb
index 7f24469f625e66dcafc3131cd9b37e9d2a446db0..15bd64ccc76aab6e1d8887b7ca56f10b2be5c02b 100644 (file)
@@ -86,7 +86,8 @@ class UserTest < ActiveSupport::TestCase
     # These need to be 3 chars in length, otherwise the length test above
     # should be used.
     bad = [ "<hr/>", "test@example.com", "s/f", "aa/", "aa;", "aa.",
     # These need to be 3 chars in length, otherwise the length test above
     # should be used.
     bad = [ "<hr/>", "test@example.com", "s/f", "aa/", "aa;", "aa.",
-            "aa,", "aa?", "/;.,?", "も対応します/", "#ping" ]
+            "aa,", "aa?", "/;.,?", "も対応します/", "#ping",
+            "foo\x1fbar", "foo\x7fbar" ]
     ok.each do |display_name|
       user = users(:normal_user)
       user.display_name = display_name
     ok.each do |display_name|
       user = users(:normal_user)
       user.display_name = display_name