From 79f92a675af528ecbe5abcc15b9c98805c9c7315 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 25 Jan 2008 10:31:06 +0000 Subject: User display format is now configurable in administration settings. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1103 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/user_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') 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 -- cgit v1.2.3