mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Test abstract controller's localize method.
This commit is contained in:
parent
996aba341a
commit
1de60c54d3
1 changed files with 6 additions and 0 deletions
|
@ -36,4 +36,10 @@ class TranslationControllerTest < ActiveSupport::TestCase
|
|||
I18n.stubs(:translate).with(key).returns(expected)
|
||||
assert_equal expected, @controller.t(key)
|
||||
end
|
||||
|
||||
def test_localize
|
||||
time, expected = Time.gm(2000), 'Sat, 01 Jan 2000 00:00:00 +0000'
|
||||
I18n.stubs(:localize).with(time).returns(expected)
|
||||
assert_equal expected, @controller.l(time)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue