set locale for anonymous from header

set locale on signup

update spec

add locale option
This commit is contained in:
scossar
2016-02-06 11:49:39 -08:00
parent f887363e83
commit 0a396583ed
8 changed files with 146 additions and 18 deletions

View File

@ -84,5 +84,16 @@ describe ApplicationHelper do
end
end
describe '#rtl_class' do
it "returns 'rtl' when the I18n.locale is rtl" do
I18n.stubs(:locale).returns(:he)
expect(helper.rtl_class).to eq('rtl')
end
it 'returns an empty string when the I18n.locale is not rtl' do
I18n.stubs(:locale).returns(:zh_TW)
expect(helper.rtl_class).to eq('')
end
end
end