Commit 9d383ef16cc514fe2f33a027846087e3a4a7ed77
Committed by
Daniela Feitosa
1 parent
d82148d0
Exists in
stable-spb-1.4
and in
8 other branches
adding unit tests for TinyMCE pt and fr languages
(cherry picked from commit f92b46d152879d108b304ddfde6b43648d2830cd)
Showing
1 changed file
with
11 additions
and
1 deletions
Show diff stats
test/unit/language_helper_test.rb
@@ -19,8 +19,18 @@ class LanguageHelperTest < ActiveSupport::TestCase | @@ -19,8 +19,18 @@ class LanguageHelperTest < ActiveSupport::TestCase | ||
19 | end | 19 | end |
20 | 20 | ||
21 | should 'remove country code for TinyMCE' do | 21 | should 'remove country code for TinyMCE' do |
22 | + self.expects(:language).returns('de_DE') | ||
23 | + assert_equal 'de', tinymce_language | ||
24 | + end | ||
25 | + | ||
26 | + should 'not remove country code for TinyMCE for pt_BR language' do | ||
22 | self.expects(:language).returns('pt_BR') | 27 | self.expects(:language).returns('pt_BR') |
23 | - assert_equal 'pt', tinymce_language | 28 | + assert_equal 'pt_BR', tinymce_language |
29 | + end | ||
30 | + | ||
31 | + should 'not remove country code for TinyMCE for fr_FR language' do | ||
32 | + self.expects(:language).returns('fr_FR') | ||
33 | + assert_equal 'fr_FR', tinymce_language | ||
24 | end | 34 | end |
25 | 35 | ||
26 | should 'downcase and use dash for HTML language' do | 36 | should 'downcase and use dash for HTML language' do |