mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add a regression test that ActionText caught
ActionText is using ActionView in a way that ActionView doesn't have in it's test suite. This is just a regression test to hit that same use case.
This commit is contained in:
parent
e105c074d6
commit
5f596e299e
2 changed files with 5 additions and 0 deletions
1
actionview/test/fixtures/test/_template_not_named_customer.html.erb
vendored
Normal file
1
actionview/test/fixtures/test/_template_not_named_customer.html.erb
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Hello: <%= customer.name %>
|
|
@ -325,6 +325,10 @@ module RenderTestCases
|
|||
assert_equal "NilClass", @view.render(partial: "test/klass", object: nil)
|
||||
end
|
||||
|
||||
def test_render_object_different_name
|
||||
assert_equal "Hello: t.lo", @view.render(partial: "test/template_not_named_customer", object: Customer.new("t.lo"), as: "customer").chomp
|
||||
end
|
||||
|
||||
def test_render_object_with_array
|
||||
assert_equal "[1, 2, 3]", @view.render(partial: "test/object_inspector", object: [1, 2, 3])
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue