User display format is now configurable in administration settings.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1103 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-01-25 10:31:06 +00:00
parent 3d5d1a38e3
commit 79f92a675a
30 changed files with 65 additions and 6 deletions
+8
View File
@@ -76,6 +76,14 @@ class UserTest < Test::Unit::TestCase
assert_equal User.hash_password("hello"), user.hashed_password
end
def test_name_format
assert_equal 'Smith, John', @jsmith.name(:lastname_coma_firstname)
Setting.user_format = :firstname_lastname
assert_equal 'John Smith', @jsmith.name
Setting.user_format = :username
assert_equal 'jsmith', @jsmith.name
end
def test_lock
user = User.try_to_login("jsmith", "jsmith")
assert_equal @jsmith, user