Skip to content

Commit

Permalink
update multi-threaded fallbacks test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed Jan 4, 2021
1 parent 714c376 commit e264dca
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/backend/fallbacks_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,18 @@ def setup
end

test "multi-threaded fallbacks" do
Thread.new do
I18n.fallbacks = [:en]

thread = Thread.new do
I18n.fallbacks = [:de]
end

begin
thread.join
assert_equal 'Bar in :en', I18n.t(:bar, :locale => :'pt-BR')
ensure
thread.exit
I18n.fallbacks = I18n::Locale::Fallbacks.new
end
end
end
Expand Down

0 comments on commit e264dca

Please sign in to comment.