Commit 05e25f81 authored by tmaruyama's avatar tmaruyama
Browse files

add new user format "lastname" (#10937)

git-svn-id: https://svn.redmine.org/redmine/trunk@10543 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 8c9f3a04
......@@ -48,10 +48,15 @@ class User < Principal
:order => %w(lastname firstname id),
:setting_order => 4
},
:lastname => {
:string => '#{lastname}',
:order => %w(lastname id),
:setting_order => 5
},
:username => {
:string => '#{login}',
:order => %w(login id),
:setting_order => 5
:setting_order => 6
},
}
......
......@@ -417,6 +417,9 @@ class UserTest < ActiveSupport::TestCase
with_settings :user_format => :username do
assert_equal 'jsmith', @jsmith.reload.name
end
with_settings :user_format => :lastname do
assert_equal 'Smith', @jsmith.reload.name
end
end
def test_today_should_return_the_day_according_to_user_time_zone
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment