aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorgbuesing <gbuesing@gmail.com>2008-05-18 10:59:24 -0500
committergbuesing <gbuesing@gmail.com>2008-05-18 10:59:24 -0500
commite30a263bf1744d0b55d073c7d1087d0d64181d2c (patch)
tree5deb91e3c055264400c29b07740cc33f44269b98 /actionpack/test/template
parentbe85868987675a158fd4111393b9161296431728 (diff)
downloadrails-e30a263bf1744d0b55d073c7d1087d0d64181d2c.tar.gz
rails-e30a263bf1744d0b55d073c7d1087d0d64181d2c.tar.bz2
rails-e30a263bf1744d0b55d073c7d1087d0d64181d2c.zip
InstanceTag#default_time_from_options overflows to DateTime
Diffstat (limited to 'actionpack/test/template')
-rwxr-xr-xactionpack/test/template/date_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb
index ae83c7bf47..0a7b19ba96 100755
--- a/actionpack/test/template/date_helper_test.rb
+++ b/actionpack/test/template/date_helper_test.rb
@@ -1722,6 +1722,12 @@ class DateHelperTest < ActionView::TestCase
assert_equal 2, dummy_instance_tag.send!(:default_time_from_options, :hour => 2).hour
end
end
+
+ def test_instance_tag_default_time_from_options_handles_far_future_date
+ dummy_instance_tag = ActionView::Helpers::InstanceTag.new(1,2,3)
+ time = dummy_instance_tag.send!(:default_time_from_options, :year => 2050, :month => 2, :day => 10, :hour => 15, :min => 30, :sec => 45)
+ assert_equal 2050, time.year
+ end
end
protected