aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorJoe Van Dyk <joe@fixieconsulting.com>2012-01-24 10:30:46 -0800
committerJoe Van Dyk <joe@fixieconsulting.com>2012-01-24 10:30:46 -0800
commit59a408eb64729909aca15ef59291aea2cef951e2 (patch)
treee970fc047c6cd7a4fb682af8df53a0843b2e05db /actionpack/test/template
parentdc826f9977650c105e9bfd308d6d4fc71bb6ec6e (diff)
downloadrails-59a408eb64729909aca15ef59291aea2cef951e2.tar.gz
rails-59a408eb64729909aca15ef59291aea2cef951e2.tar.bz2
rails-59a408eb64729909aca15ef59291aea2cef951e2.zip
datetime_select should work with -/+ infinity dates
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/date_helper_test.rb12
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 fadfb59572..08e1b44301 100644
--- a/actionpack/test/template/date_helper_test.rb
+++ b/actionpack/test/template/date_helper_test.rb
@@ -2084,6 +2084,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