summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-02-15 09:18:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-02-15 09:18:01 +0000
commit1114bf5e99e43fca2347be1ed1a18bb64f5a45b2 (patch)
tree2c21ebb719ff3cb19cb0d98167d8c02f91c51ed8 /test/test_helper.rb
parent88568da4516d3a94f697e1939a74ce22a7b27c3c (diff)
downloadredmine-1114bf5e99e43fca2347be1ed1a18bb64f5a45b2.tar.gz
redmine-1114bf5e99e43fca2347be1ed1a18bb64f5a45b2.zip
Fixed: Export CSV - Custom field true/false not using translation (#16081).
git-svn-id: http://svn.redmine.org/redmine/trunk@12896 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 79f30e7cd..bc1a350a2 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -119,6 +119,14 @@ class ActiveSupport::TestCase
User.current = saved_user
end
+ def with_locale(locale, &block)
+ saved_localed = ::I18n.locale
+ ::I18n.locale = locale
+ yield
+ ensure
+ ::I18n.locale = saved_localed
+ end
+
def change_user_password(login, new_password)
user = User.where(:login => login).first
user.password, user.password_confirmation = new_password, new_password