aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/filter_params_test.rb3
-rw-r--r--actionpack/test/controller/render_test.rb7
-rw-r--r--actionpack/test/controller/routing_test.rb11
-rw-r--r--actionpack/test/controller/send_file_test.rb2
4 files changed, 14 insertions, 9 deletions
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)
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
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|
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']