diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-22 23:11:08 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-22 23:11:08 -0800 |
commit | 2b74a13a4b4d6b8d21e58e49a33872baa95d3b4a (patch) | |
tree | 86c7cc4d3260e65147507dd9150d1690e33610b9 /actionpack/test/template | |
parent | 14e8ca6af58a3fa31137d3f4acc920daf2c6c0be (diff) | |
parent | 88ec722a0ff0752e4170d41d0c956a387cd9b4db (diff) | |
download | rails-2b74a13a4b4d6b8d21e58e49a33872baa95d3b4a.tar.gz rails-2b74a13a4b4d6b8d21e58e49a33872baa95d3b4a.tar.bz2 rails-2b74a13a4b4d6b8d21e58e49a33872baa95d3b4a.zip |
Merge pull request #4608 from indrekj/translated_date_order
Raise exception when date.order includes invalid elements
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/date_helper_i18n_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/date_helper_i18n_test.rb b/actionpack/test/template/date_helper_i18n_test.rb index e3d3d5ff77..ef3d7d97ee 100644 --- a/actionpack/test/template/date_helper_i18n_test.rb +++ b/actionpack/test/template/date_helper_i18n_test.rb @@ -118,4 +118,12 @@ class DateHelperSelectTagsI18nTests < ActiveSupport::TestCase I18n.expects(:translate).with(:'date.order', :locale => 'en').returns [:year, :month, :day] datetime_select('post', 'updated_at', :locale => 'en') end + + def test_date_or_time_select_given_invalid_order + I18n.expects(:translate).with(:'date.order', :locale => 'en').returns [:invalid, :month, :day] + + assert_raise StandardError do + datetime_select('post', 'updated_at', :locale => 'en') + end + end end |