aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/actionpack/controller/render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/actionpack/controller/render_test.rb')
-rw-r--r--actionview/test/actionpack/controller/render_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionview/test/actionpack/controller/render_test.rb b/actionview/test/actionpack/controller/render_test.rb
index e059f37d38..3e6b55a87e 100644
--- a/actionview/test/actionpack/controller/render_test.rb
+++ b/actionview/test/actionpack/controller/render_test.rb
@@ -485,6 +485,10 @@ class TestController < ActionController::Base
render partial: "customer", locals: { customer: Customer.new("david") }
end
+ def partial_with_string_locals
+ render partial: "customer", locals: { "customer" => Customer.new("david") }
+ end
+
def partial_with_form_builder
render partial: ActionView::Helpers::FormBuilder.new(:post, nil, view_context, {})
end
@@ -1170,6 +1174,11 @@ class RenderTest < ActionController::TestCase
assert_equal "Hello: david", @response.body
end
+ def test_partial_with_string_locals
+ get :partial_with_string_locals
+ assert_equal "Hello: david", @response.body
+ end
+
def test_partial_with_form_builder
get :partial_with_form_builder
assert_equal "<label for=\"post_title\">Title</label>\n", @response.body