projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
679e592
)
fixing the new display name test
author
Shaun McDonald
<shaun@shaunmcdonald.me.uk>
Tue, 15 Jul 2008 18:04:35 +0000
(18:04 +0000)
committer
Shaun McDonald
<shaun@shaunmcdonald.me.uk>
Tue, 15 Jul 2008 18:04:35 +0000
(18:04 +0000)
test/unit/user_test.rb
patch
|
blob
|
history
diff --git
a/test/unit/user_test.rb
b/test/unit/user_test.rb
index bb17368b49b46ce464edb59223b547383d9b1f63..583b06e69492dce35a7d2a49fb4192e837ef1804 100644
(file)
--- 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"
+ asser
t !user.valid?
end
end