add new user format "lastname" (#10937)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10543 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
de0e0f09a3
commit
a29854707b
|
@ -48,10 +48,15 @@ class User < Principal
|
||||||
:order => %w(lastname firstname id),
|
:order => %w(lastname firstname id),
|
||||||
:setting_order => 4
|
:setting_order => 4
|
||||||
},
|
},
|
||||||
|
:lastname => {
|
||||||
|
:string => '#{lastname}',
|
||||||
|
:order => %w(lastname id),
|
||||||
|
:setting_order => 5
|
||||||
|
},
|
||||||
:username => {
|
:username => {
|
||||||
:string => '#{login}',
|
:string => '#{login}',
|
||||||
:order => %w(login id),
|
:order => %w(login id),
|
||||||
:setting_order => 5
|
:setting_order => 6
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -417,6 +417,9 @@ class UserTest < ActiveSupport::TestCase
|
||||||
with_settings :user_format => :username do
|
with_settings :user_format => :username do
|
||||||
assert_equal 'jsmith', @jsmith.reload.name
|
assert_equal 'jsmith', @jsmith.reload.name
|
||||||
end
|
end
|
||||||
|
with_settings :user_format => :lastname do
|
||||||
|
assert_equal 'Smith', @jsmith.reload.name
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_today_should_return_the_day_according_to_user_time_zone
|
def test_today_should_return_the_day_according_to_user_time_zone
|
||||||
|
|
Loading…
Reference in New Issue