Skip to content

Commit

Permalink
use global additionals test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Oct 5, 2024
1 parent e94f953 commit 6ff8557
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions test/unit/i18n_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,10 @@ def test_valid_languages
end

def test_locales_validness
lang_files_count = Rails.root.glob('plugins/redmine_sudo/config/locales/*.yml').size

assert_equal 9, lang_files_count
valid_languages.each do |lang|
assert set_language_if_valid(lang)
case lang.to_s
when 'en'

assert_equal 'Become Administrator', l(:label_become_admin)
when 'pt-BR', 'de', 'es', 'fr', 'it', 'ja', 'ru', 'zh'

assert_not l(:label_become_admin) == 'Become Administrator', lang
end
end

set_language_if_valid 'en'
assert_locales_validness plugin: 'redmine_sudo',
file_cnt: 9,
locales: %w[pt-BR de es fr it ja ru zh],
control_string: :label_become_admin,
control_english: 'Become Administrator'
end
end

0 comments on commit 6ff8557

Please sign in to comment.