From 02df588cf79cc3738278aea501a2d219afb783b5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 24 Feb 2005 11:50:59 +0000 Subject: Fixed tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@786 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/redirect_test.rb | 2 +- .../test/template/form_options_helper_test.rb | 128 ++++++++++----------- 2 files changed, 65 insertions(+), 65 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb index 6ae26b739d..fafff144df 100755 --- a/actionpack/test/controller/redirect_test.rb +++ b/actionpack/test/controller/redirect_test.rb @@ -31,6 +31,6 @@ class RedirectTest < Test::Unit::TestCase def test_redirect_with_method_reference_and_parameters get :method_redirect - assert_redirect_url "http://test.host/redirect/dashboard?message=hello&id=1" + assert_redirect_url "http://test.host/redirect/dashboard/1?message=hello" end end \ No newline at end of file diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb index 83edcb8637..4203ab7079 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -129,67 +129,67 @@ class FormOptionsHelperTest < Test::Unit::TestCase def test_time_zone_options_no_parms opts = time_zone_options_for_select - assert_equal "\n" + - "\n" + - "\n" + - "\n" + - "", + assert_equal "\n" + + "\n" + + "\n" + + "\n" + + "", opts end def test_time_zone_options_with_selected - opts = time_zone_options_for_select( TimeZone.new( "D" ) ) - assert_equal "\n" + - "\n" + - "\n" + - "\n" + - "", + opts = time_zone_options_for_select( "D" ) + assert_equal "\n" + + "\n" + + "\n" + + "\n" + + "", opts end def test_time_zone_options_with_unknown_selected - opts = time_zone_options_for_select( TimeZone.new( "K" ) ) - assert_equal "\n" + - "\n" + - "\n" + - "\n" + - "", + opts = time_zone_options_for_select( "K" ) + assert_equal "\n" + + "\n" + + "\n" + + "\n" + + "", opts end def test_time_zone_options_with_priority_zones zones = [ TimeZone.new( "B" ), TimeZone.new( "E" ) ] opts = time_zone_options_for_select( nil, zones ) - assert_equal "\n" + - "" + + assert_equal "\n" + + "" + "\n" + - "\n" + - "\n" + - "", + "\n" + + "\n" + + "", opts end def test_time_zone_options_with_selected_priority_zones zones = [ TimeZone.new( "B" ), TimeZone.new( "E" ) ] - opts = time_zone_options_for_select( TimeZone.new("E"), zones ) - assert_equal "\n" + - "" + + opts = time_zone_options_for_select( "E", zones ) + assert_equal "\n" + + "" + "\n" + - "\n" + - "\n" + - "", + "\n" + + "\n" + + "", opts end def test_time_zone_options_with_unselected_priority_zones zones = [ TimeZone.new( "B" ), TimeZone.new( "E" ) ] - opts = time_zone_options_for_select( TimeZone.new("C"), zones ) - assert_equal "\n" + - "" + + opts = time_zone_options_for_select( "C", zones ) + assert_equal "\n" + + "" + "\n" + - "\n" + - "\n" + - "", + "\n" + + "\n" + + "", opts end @@ -253,72 +253,72 @@ class FormOptionsHelperTest < Test::Unit::TestCase end def test_time_zone_select - @firm = Firm.new( TimeZone.new( "D" ) ) + @firm = Firm.new("D") html = time_zone_select( "firm", "time_zone" ) assert_equal "", html end def test_time_zone_select_with_blank - @firm = Firm.new(TimeZone.new("D")) + @firm = Firm.new("D") html = time_zone_select("firm", "time_zone", nil, :include_blank => true) assert_equal "", html end def test_time_zone_select_with_style - @firm = Firm.new(TimeZone.new("D")) + @firm = Firm.new("D") html = time_zone_select("firm", "time_zone", nil, {}, "style" => "color: red") assert_equal "", html end def test_time_zone_select_with_blank_and_style - @firm = Firm.new(TimeZone.new("D")) + @firm = Firm.new("D") html = time_zone_select("firm", "time_zone", nil, { :include_blank => true }, "style" => "color: red") assert_equal "", html end def test_time_zone_select_with_priority_zones - @firm = Firm.new(TimeZone.new("D")) + @firm = Firm.new("D") zones = [ TimeZone.new("A"), TimeZone.new("D") ] html = time_zone_select("firm", "time_zone", zones ) assert_equal "", html end -- cgit v1.2.3