1
0
Fork 0
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:
Jens Bissinger 2013-01-20 15:44:03 +01:00
parent 996aba341a
commit 1de60c54d3

View file

@ -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