diff options
author | Jens Bissinger <mail@jens-bissinger.de> | 2013-01-20 15:44:03 +0100 |
---|---|---|
committer | Jens Bissinger <mail@jens-bissinger.de> | 2013-01-20 15:44:03 +0100 |
commit | 1de60c54d37acb29990ab5c7201c9a3c0955e831 (patch) | |
tree | 689de3791170c225aea656e88ae9647af01af507 /actionpack/test/abstract | |
parent | 996aba341ace42393f4e2cd7c00489dac20f2bd3 (diff) | |
download | rails-1de60c54d37acb29990ab5c7201c9a3c0955e831.tar.gz rails-1de60c54d37acb29990ab5c7201c9a3c0955e831.tar.bz2 rails-1de60c54d37acb29990ab5c7201c9a3c0955e831.zip |
Test abstract controller's localize method.
Diffstat (limited to 'actionpack/test/abstract')
-rw-r--r-- | actionpack/test/abstract/translation_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/abstract/translation_test.rb b/actionpack/test/abstract/translation_test.rb index 99064a8b87..64cf012b75 100644 --- a/actionpack/test/abstract/translation_test.rb +++ b/actionpack/test/abstract/translation_test.rb @@ -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 |