From 7aa730440c2143051b46c0857e637100f9367628 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 25 Jun 2009 12:51:21 -0500 Subject: Remove deprecated implicit ivar assignment --- actionpack/test/controller/render_test.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 9934639d21..acb0c895e0 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -1268,13 +1268,6 @@ class RenderTest < ActionController::TestCase assert_equal "Hola: PratikHola: Amy", @response.body end - def test_partial_with_implicit_local_assignment - assert_deprecated do - get :partial_with_implicit_local_assignment - assert_equal "Hello: Marcel", @response.body - end - end - def test_render_missing_partial_template assert_raise(ActionView::MissingTemplate) do get :missing_partial -- cgit v1.2.3 From 7837da41a378a69f88763701291a79ef55f14dea Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 25 Jun 2009 14:47:15 -0500 Subject: send_data should set Content-Length as a string --- actionpack/test/controller/send_file_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index d88d5c5dac..ae32ee5649 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -115,7 +115,7 @@ class SendFileTest < ActionController::TestCase @controller.send(:send_file_headers!, options) h = @controller.headers - assert_equal 1, h['Content-Length'] + assert_equal '1', h['Content-Length'] assert_equal 'image/png', @controller.content_type assert_equal 'disposition; filename="filename"', h['Content-Disposition'] assert_equal 'binary', h['Content-Transfer-Encoding'] -- cgit v1.2.3 From 68b02cb00aae4f4ee1b2b9b1eadb6951b747c181 Mon Sep 17 00:00:00 2001 From: Vicente Mundim Date: Sat, 27 Jun 2009 12:40:55 +1200 Subject: Make filter_parameters work correctly with array parameters. --- actionpack/test/controller/filter_params_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/filter_params_test.rb b/actionpack/test/controller/filter_params_test.rb index 8c9e4f81de..f7864745eb 100644 --- a/actionpack/test/controller/filter_params_test.rb +++ b/actionpack/test/controller/filter_params_test.rb @@ -40,7 +40,8 @@ class FilterParamTest < ActionController::TestCase [{'foo'=>'bar', 'bar'=>'foo'},{'foo'=>'[FILTERED]', 'bar'=>'foo'},%w'foo baz'], [{'foo'=>'bar', 'baz'=>'foo'},{'foo'=>'[FILTERED]', 'baz'=>'[FILTERED]'},%w'foo baz'], [{'bar'=>{'foo'=>'bar','bar'=>'foo'}},{'bar'=>{'foo'=>'[FILTERED]','bar'=>'foo'}},%w'fo'], - [{'foo'=>{'foo'=>'bar','bar'=>'foo'}},{'foo'=>'[FILTERED]'},%w'f banana']] + [{'foo'=>{'foo'=>'bar','bar'=>'foo'}},{'foo'=>'[FILTERED]'},%w'f banana'], + [{'baz'=>[{'foo'=>'baz'}]}, {'baz'=>[{'foo'=>'[FILTERED]'}]}, %w(foo)]] test_hashes.each do |before_filter, after_filter, filter_words| FilterParamController.filter_parameter_logging(*filter_words) -- cgit v1.2.3 From 0515256fd32e6efb67fe90aedf0dadc25dc9e1ba Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 1 Jul 2009 11:16:18 -0700 Subject: Accept Symbol for contoller name [#2855 state:resolved] Signed-off-by: Yehuda Katz + Carl Lerche --- actionpack/test/controller/routing_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index c2acc03a1b..16d7df4843 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1667,6 +1667,17 @@ class RouteSetTest < Test::Unit::TestCase assert_equal 1, set.routes.size end + def test_draw_symbol_controller_name + assert_equal 0, set.routes.size + set.draw do |map| + map.connect '/users/index', :controller => :users, :action => :index + end + @request = ActionController::TestRequest.new + @request.request_uri = '/users/index' + assert_nothing_raised { set.recognize(@request) } + assert_equal 1, set.routes.size + end + def test_named_draw assert_equal 0, set.routes.size set.draw do |map| -- cgit v1.2.3