Martin Edenhofer 9 лет назад
Родитель
Сommit
d7f3f4a7ff
2 измененных файлов с 11 добавлено и 6 удалено
  1. 3 0
      test/unit/notification_factory_test.rb
  2. 8 6
      test/unit/translation_test.rb

+ 3 - 0
test/unit/notification_factory_test.rb

@@ -2,6 +2,9 @@
 require 'test_helper'
 
 class NotificationFactoryTest < ActiveSupport::TestCase
+
+  Translation.load('de-de')
+
   test 'notifications send' do
     result = NotificationFactory.send(
       recipient: User.find(2),

+ 8 - 6
test/unit/translation_test.rb

@@ -2,24 +2,26 @@
 require 'test_helper'
 
 class TranslationTest < ActiveSupport::TestCase
+
+  Translation.load('de-de')
+
   test 'translation' do
     tests = [
-
-      # test 1
       {
         locale: 'en',
         string: 'New',
         result: 'New',
       },
-
-      # test 2
+      {
+        locale: 'en-us',
+        string: 'New',
+        result: 'New',
+      },
       {
         locale: 'de-de',
         string: 'New',
         result: 'Neu',
       },
-
-      # test 3
       {
         locale: 'de-de',
         string: 'not translated - lalala',