mirror of
https://github.com/github/rails.git
synced 2026-02-10 06:04:55 -05:00
added passing test for using partials with an xml builder
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5044 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -60,6 +60,10 @@ class TestController < ActionController::Base
|
||||
render_action "hello"
|
||||
end
|
||||
|
||||
def builder_partial_test
|
||||
render_action "hello_world_container"
|
||||
end
|
||||
|
||||
def partials_list
|
||||
@test_unchanged = 'hello'
|
||||
@customers = [ Customer.new("david"), Customer.new("mary") ]
|
||||
@@ -193,6 +197,11 @@ class RenderTest < Test::Unit::TestCase
|
||||
assert_equal "<p>This is grand!</p>\n", @response.body
|
||||
end
|
||||
|
||||
def test_render_xml_with_partial
|
||||
get :builder_partial_test
|
||||
assert_equal "<test>\n <hello/>\n</test>\n", @response.body
|
||||
end
|
||||
|
||||
def test_layout_rendering
|
||||
get :layout_test
|
||||
assert_equal "<html>Hello world!</html>", @response.body
|
||||
|
||||
1
actionpack/test/fixtures/test/_hello.rxml
vendored
Normal file
1
actionpack/test/fixtures/test/_hello.rxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
xm.hello
|
||||
3
actionpack/test/fixtures/test/hello_world_container.rxml
vendored
Normal file
3
actionpack/test/fixtures/test/hello_world_container.rxml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
xml.test do
|
||||
render :partial => 'hello', :locals => { :xm => xml }
|
||||
end
|
||||
Reference in New Issue
Block a user