From 9e38203af18e8a49093f236779fa51a990daff62 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 15 Aug 2015 09:48:08 +0200 Subject: [PATCH] Reduce locales for test env. --- app/models/translation.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/translation.rb b/app/models/translation.rb index 2f4d9cb58..0d1b94693 100644 --- a/app/models/translation.rb +++ b/app/models/translation.rb @@ -15,7 +15,11 @@ load translations from online =end def self.load - Locale.where(active: true).each {|locale| + locales = Locale.where(active: true) + if Rails.env.test? + locales = Locale.where(active: true, name: ['en-us', 'de-de']) + end + locales.each {|locale| url = "https://i18n.zammad.com/api/v1/translations/#{locale.locale}" if !UserInfo.current_user_id UserInfo.current_user_id = 1