aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-05-15 03:15:36 +0000
committerRick Olson <technoweenie@gmail.com>2007-05-15 03:15:36 +0000
commitfa3618d3753b5591ed19d98d52c55716d814e34a (patch)
tree046f0f70c5a692a0944a5386c8cebdecd6203854
parent80074cb4de2e60cd771b76d396d61e5c4bc0aff6 (diff)
downloadrails-fa3618d3753b5591ed19d98d52c55716d814e34a.tar.gz
rails-fa3618d3753b5591ed19d98d52c55716d814e34a.tar.bz2
rails-fa3618d3753b5591ed19d98d52c55716d814e34a.zip
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
-rw-r--r--actionpack/test/controller/render_test.rb5
-rw-r--r--actionpack/test/fixtures/test/_partial.js.erb1
2 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 968559fcc2..510d1a8765 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -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)
diff --git a/actionpack/test/fixtures/test/_partial.js.erb b/actionpack/test/fixtures/test/_partial.js.erb
new file mode 100644
index 0000000000..b350cdd7ef
--- /dev/null
+++ b/actionpack/test/fixtures/test/_partial.js.erb
@@ -0,0 +1 @@
+partial js \ No newline at end of file