diff options
Diffstat (limited to 'test/unit/user_test.rb')
-rw-r--r-- | test/unit/user_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 4e11ffecc..6e995b7e2 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -442,6 +442,11 @@ class UserTest < ActiveSupport::TestCase def test_name_format assert_equal 'John S.', @jsmith.name(:firstname_lastinitial) assert_equal 'Smith, John', @jsmith.name(:lastname_coma_firstname) + assert_equal 'J. Smith', @jsmith.name(:firstinitial_lastname) + assert_equal 'J.-P. Lang', User.new(:firstname => 'Jean-Philippe', :lastname => 'Lang').name(:firstinitial_lastname) + end + + def test_name_should_use_setting_as_default_format with_settings :user_format => :firstname_lastname do assert_equal 'John Smith', @jsmith.reload.name end |