From fa3618d3753b5591ed19d98d52c55716d814e34a Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Tue, 15 May 2007 03:15:36 +0000 Subject: [PATCH] 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 --- actionpack/test/controller/render_test.rb | 5 +++++ actionpack/test/fixtures/test/_partial.js.erb | 1 + 2 files changed, 6 insertions(+) create mode 100644 actionpack/test/fixtures/test/_partial.js.erb 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