From 17cfa887a1660f69e1fd19cc4d048a7903097cca Mon Sep 17 00:00:00 2001 From: Aditya Sanghi Date: Fri, 15 Oct 2010 22:43:01 +0530 Subject: [PATCH] failing test to confirm that year does not get separated by separator by slash --- actionpack/test/template/date_helper_test.rb | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index 0cf7885..6fe5591 100644 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -1584,6 +1584,28 @@ class DateHelperTest < ActionView::TestCase assert_dom_equal expected, date_select("post", "written_on", { :date_separator => " / " }) end + def test_date_select_with_separator_and_order + @post = Post.new + @post.written_on = Date.new(2004, 6, 15) + + expected = %{\n} + expected << %{\n\n\n\n\n\n\n\n\n\n\n\n} + expected << "\n" + + expected << " / " + + expected << %{\n" + + assert_dom_equal expected, date_select("post", "written_on", { :order => [:day, :month, :year], :date_separator => " / " }) + end + def test_date_select_with_default_prompt @post = Post.new @post.written_on = Date.new(2004, 6, 15) -- 1.7.1