mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
add test case for js.erb partials on *.js formatted requests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
80074cb4de
commit
fa3618d375
2 changed files with 6 additions and 0 deletions
|
@ -388,6 +388,11 @@ class RenderTest < Test::Unit::TestCase
|
|||
assert_equal %(Element.replace("foo", "partial html");), @response.body
|
||||
end
|
||||
|
||||
def test_should_render_js_partial
|
||||
xhr :get, :partial, :format => 'js'
|
||||
assert_equal 'partial js', @response.body
|
||||
end
|
||||
|
||||
protected
|
||||
def assert_deprecated_render(&block)
|
||||
assert_deprecated(/render/, &block)
|
||||
|
|
1
actionpack/test/fixtures/test/_partial.js.erb
vendored
Normal file
1
actionpack/test/fixtures/test/_partial.js.erb
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
partial js
|
Loading…
Reference in a new issue