class RenderJSTest

Public Instance Methods

test_render_vanilla_js() click to toggle source
# File actionpack/test/controller/render_js_test.rb, line 26
def test_render_vanilla_js
  get :render_vanilla_js_hello, xhr: true
  assert_equal "alert('hello')", @response.body
  assert_equal "text/javascript", @response.content_type
end
test_should_render_js_partial() click to toggle source
# File actionpack/test/controller/render_js_test.rb, line 32
def test_should_render_js_partial
  get :show_partial, format: "js", xhr: true
  assert_equal "partial js", @response.body
end