Skip to content
Browse files

Test abstract controller's localize method.

  • Loading branch information...
1 parent 996aba3 commit 1de60c54d37acb29990ab5c7201c9a3c0955e831 @bsingr bsingr committed Jan 20, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 actionpack/test/abstract/translation_test.rb
View
6 actionpack/test/abstract/translation_test.rb
@@ -36,4 +36,10 @@ def test_default_translation
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

0 comments on commit 1de60c5

Please sign in to comment.
Something went wrong with that request. Please try again.