From c29db9f210c81a757e035ee6c8e1a055f6b676b3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 13 Apr 2005 05:15:41 +0000 Subject: Added minute_step as an option to select_minute (and the helpers that use it) to jump in larger increments than just 1 minute. At 15, it would return 0, 15, 30, 45 options #1085 [ordwaye@evergreen.edu] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/date_helper_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index fa51ef8253..ab5cfc1c7a 100755 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -164,6 +164,14 @@ class DateHelperTest < Test::Unit::TestCase assert_equal expected, select_minute(Time.mktime(2003, 8, 16, 8, 4, 18), :include_blank => true) end + def test_select_minute_with_blank_and_step + expected = %(\n" + + assert_equal expected, select_minute(Time.mktime(2003, 8, 16, 8, 4, 18), { :include_blank => true , :minute_step => 15 }) + end + def test_select_minute_nil_with_blank expected = %(\n) + expected << %(\n\n\n\n\n) + expected << "\n" + + assert_equal expected, select_minute(nil, { :include_blank => true , :minute_step => 15 }) + end + def test_select_second expected = %(