X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9694b977d3b54f917006aa812d875fc277fde41d..b931d6f516d049ac42fcd70f33f130c252f5d0a9:/test/unit/user_test.rb diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 583b06e69..489f76a1d 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -63,6 +63,25 @@ class UserTest < Test::Unit::TestCase user.display_name = "" assert !user.valid? user.display_name = nil + # Don't understand why it isn't allowing a nil value, + # when the validates statements specifically allow it + # It appears the database does not allow null values assert !user.valid? end + + def test_display_name_valid + ok = [ "Name", "'me", "he\"", "#ping", "