summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-25 10:31:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-25 10:31:06 +0000
commit79f92a675af528ecbe5abcc15b9c98805c9c7315 (patch)
treec5c2f04a5b16bfc2d98fe03495bc83f902188ee0 /test
parent3d5d1a38e3d48e1fda7eee751563cbf8c3b0f00b (diff)
downloadredmine-79f92a675af528ecbe5abcc15b9c98805c9c7315.tar.gz
redmine-79f92a675af528ecbe5abcc15b9c98805c9c7315.zip
User display format is now configurable in administration settings.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1103 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/user_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index 9f58d278f..845a34afd 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -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