aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/date_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/date_helper_test.rb')
-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 9e2f4ec347..584d1830eb 100644
--- a/actionpack/test/template/date_helper_test.rb
+++ b/actionpack/test/template/date_helper_test.rb
@@ -2118,6 +2118,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