diff options
author | Joe Van Dyk <joe@fixieconsulting.com> | 2012-01-24 10:30:46 -0800 |
---|---|---|
committer | Alexey Vakhov <vakhov@gmail.com> | 2012-03-28 23:06:52 +0400 |
commit | b9cbadf1e30f8b6a94925108572358b32d37d351 (patch) | |
tree | 6993806512271eeab783117124d621088d6c4037 /actionpack/test | |
parent | dd0275e46314b6c4cddb1ae438ce1390d13aa53c (diff) | |
download | rails-b9cbadf1e30f8b6a94925108572358b32d37d351.tar.gz rails-b9cbadf1e30f8b6a94925108572358b32d37d351.tar.bz2 rails-b9cbadf1e30f8b6a94925108572358b32d37d351.zip |
datetime_select should work with -/+ infinity dates
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/date_helper_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index f622097b57..c9b8a5bb70 100644 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -2132,6 +2132,18 @@ class DateHelperTest < ActionView::TestCase assert_dom_equal expected, datetime_select("post", "updated_at", { :date_separator => " / ", :datetime_separator => " , ", :time_separator => " - ", :include_seconds => true }) end + def test_datetime_select_with_integer + @post = Post.new + @post.updated_at = 3 + datetime_select("post", "updated_at") + end + + def test_datetime_select_with_infinity # Float + @post = Post.new + @post.updated_at = (-1.0/0) + datetime_select("post", "updated_at") + end + def test_datetime_select_with_default_prompt @post = Post.new @post.updated_at = nil |