##// END OF EJS Templates
Don't change setting value in tests....
Jean-Philippe Lang -
r7943:81bcb4d99901
parent child
Show More
@@ -392,11 +392,13 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 Setting.user_format = :firstname_lastname
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 with_settings :user_format => :username do
398 assert_equal 'jsmith', @jsmith.reload.name
399 assert_equal 'jsmith', @jsmith.reload.name
399 end
400 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
402 with_settings :user_format => 'lastname_coma_firstname' do
404 with_settings :user_format => 'lastname_coma_firstname' do
General Comments 0
You need to be logged in to leave comments. Login now