summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-26 17:37:20 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-26 17:37:20 +0000
commit5a1fcf826ffe4c4d6e0f839138d442725cae2ab5 (patch)
tree82b6f8d8f638d2798315cc82abd352c77c45cd28 /test/test_helper.rb
parent0293ba7e9f4f82788363ef699327887005db7b3e (diff)
downloadredmine-5a1fcf826ffe4c4d6e0f839138d442725cae2ab5.tar.gz
redmine-5a1fcf826ffe4c4d6e0f839138d442725cae2ab5.zip
Sort the issue list by author/assignee according to user display format (#9669).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7938 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 78b83c06d..dcac221d4 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -98,11 +98,11 @@ class ActiveSupport::TestCase
end
def with_settings(options, &block)
- saved_settings = options.keys.inject({}) {|h, k| h[k] = Setting[k].dup; h}
+ saved_settings = options.keys.inject({}) {|h, k| h[k] = Setting[k].is_a?(Symbol) ? Setting[k] : Setting[k].dup; h}
options.each {|k, v| Setting[k] = v}
yield
ensure
- saved_settings.each {|k, v| Setting[k] = v}
+ saved_settings.each {|k, v| Setting[k] = v} if saved_settings
end
def change_user_password(login, new_password)