Commit 8b7097abd2a8e4a10aaf64ffe663d776cb25dbbf
1 parent
4c3b31a3
Exists in
profile_api_improvements
and in
1 other branch
avoid random failure in locale test
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
test/unit/noosfero_test.rb
@@ -43,10 +43,11 @@ class NoosferoTest < ActiveSupport::TestCase | @@ -43,10 +43,11 @@ class NoosferoTest < ActiveSupport::TestCase | ||
43 | end | 43 | end |
44 | 44 | ||
45 | should 'change locale temporarily' do | 45 | should 'change locale temporarily' do |
46 | - Noosfero.with_locale('pt') do | 46 | + current_locale = FastGettext.locale |
47 | + Noosfero.with_locale(current_locale == 'pt' ? 'en' : 'pt' ) do | ||
47 | assert_equal 'pt', FastGettext.locale | 48 | assert_equal 'pt', FastGettext.locale |
48 | end | 49 | end |
49 | - assert_equal 'en', FastGettext.locale | 50 | + assert_equal current_locale, FastGettext.locale |
50 | end | 51 | end |
51 | 52 | ||
52 | should "use default hostname of default environment as hostname of Noosfero instance" do | 53 | should "use default hostname of default environment as hostname of Noosfero instance" do |