From: Shaun McDonald Date: Tue, 15 Jul 2008 18:04:35 +0000 (+0000) Subject: fixing the new display name test X-Git-Tag: live~7557^2~316 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/9694b977d3b54f917006aa812d875fc277fde41d fixing the new display name test --- diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index bb17368b4..583b06e69 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -56,7 +56,13 @@ class UserTest < Test::Unit::TestCase def test_display_name_length user = users(:normal_user) + user.display_name = "123" + assert user.valid?, " should allow nil display name" + user.display_name = "12" + assert !user.valid?, "should not allow 2 char name" + user.display_name = "" + assert !user.valid? user.display_name = nil - asser user.valid, " should allow nil display name" + assert !user.valid? end end