Allow users to toggle interface language in their preferences

This commit is contained in:
Jonathan Allard
2014-02-18 14:53:59 -05:00
parent 1a8ebb710e
commit c513725f26
11 changed files with 57 additions and 1 deletions
@@ -44,6 +44,19 @@ describe TopicsController do
end
describe 'set_locale' do
it 'sets the one the user prefers' do
SiteSetting.stubs(:allow_user_locale).returns(true)
user = Fabricate(:user, locale: :fr)
log_in_user(user)
get :show, {topic_id: topic.id}
I18n.locale.should == :fr
end
end
end
describe 'api' do