@@ -392,10 +392,12 class UserTest < ActiveSupport::TestCase | |||||
392 |
|
392 | |||
393 | def test_name_format |
|
393 | def test_name_format | |
394 | assert_equal 'Smith, John', @jsmith.name(:lastname_coma_firstname) |
|
394 | assert_equal 'Smith, John', @jsmith.name(:lastname_coma_firstname) | |
395 |
|
|
395 | with_settings :user_format => :firstname_lastname do | |
396 | assert_equal 'John Smith', @jsmith.reload.name |
|
396 | assert_equal 'John Smith', @jsmith.reload.name | |
397 | Setting.user_format = :username |
|
397 | end | |
398 | assert_equal 'jsmith', @jsmith.reload.name |
|
398 | with_settings :user_format => :username do | |
|
399 | assert_equal 'jsmith', @jsmith.reload.name | |||
|
400 | end | |||
399 | end |
|
401 | end | |
400 |
|
402 | |||
401 | def test_fields_for_order_statement_should_return_fields_according_user_format_setting |
|
403 | def test_fields_for_order_statement_should_return_fields_according_user_format_setting |
General Comments 0
You need to be logged in to leave comments.
Login now