summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 20:28:32 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 20:28:32 +0000
commit81bcb4d99901b65a13f6f37565d1b819b0627816 (patch)
treeea1286ef7147a2b3a15110137479cfa40b50a877 /test
parent937a954013cbd0dd6b759384376ec711f8eefd75 (diff)
downloadredmine-81bcb4d99901b65a13f6f37565d1b819b0627816.tar.gz
redmine-81bcb4d99901b65a13f6f37565d1b819b0627816.zip
Don't change setting value in tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8063 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/user_test.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index a772d0079..82113dfdb 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -392,10 +392,12 @@ class UserTest < ActiveSupport::TestCase
def test_name_format
assert_equal 'Smith, John', @jsmith.name(:lastname_coma_firstname)
- Setting.user_format = :firstname_lastname
- assert_equal 'John Smith', @jsmith.reload.name
- Setting.user_format = :username
- assert_equal 'jsmith', @jsmith.reload.name
+ with_settings :user_format => :firstname_lastname do
+ assert_equal 'John Smith', @jsmith.reload.name
+ end
+ with_settings :user_format => :username do
+ assert_equal 'jsmith', @jsmith.reload.name
+ end
end
def test_fields_for_order_statement_should_return_fields_according_user_format_setting