diff options
author | Indrek Juhkam <indrek@urgas.eu> | 2012-01-22 23:47:36 +0200 |
---|---|---|
committer | Indrek Juhkam <indrek@urgas.eu> | 2012-01-22 23:47:36 +0200 |
commit | 88ec722a0ff0752e4170d41d0c956a387cd9b4db (patch) | |
tree | 2105b6246bed98b75995b46e711116d1d1758ea5 /actionpack/test | |
parent | 4e6050b9614d178c28cce45f1c33ad9d1666e330 (diff) | |
download | rails-88ec722a0ff0752e4170d41d0c956a387cd9b4db.tar.gz rails-88ec722a0ff0752e4170d41d0c956a387cd9b4db.tar.bz2 rails-88ec722a0ff0752e4170d41d0c956a387cd9b4db.zip |
Raise exception when date.order includes invalid elements
Diffstat (limited to 'actionpack/test')
-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 |