##// END OF EJS Templates
Don't change setting value in tests....
Jean-Philippe Lang -
r7943:81bcb4d99901
parent child
Show More
@@ -392,10 +392,12 class UserTest < ActiveSupport::TestCase
392 392
393 393 def test_name_format
394 394 assert_equal 'Smith, John', @jsmith.name(:lastname_coma_firstname)
395 Setting.user_format = :firstname_lastname
396 assert_equal 'John Smith', @jsmith.reload.name
397 Setting.user_format = :username
398 assert_equal 'jsmith', @jsmith.reload.name
395 with_settings :user_format => :firstname_lastname do
396 assert_equal 'John Smith', @jsmith.reload.name
397 end
398 with_settings :user_format => :username do
399 assert_equal 'jsmith', @jsmith.reload.name
400 end
399 401 end
400 402
401 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