Added test for Accept header for xml_http_request calls in functional tests (closes #4222) [agkr@pobox.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson
2006-03-18 21:23:14 +00:00
parent f6786f8dcc
commit c0ad3b6b68

View File

@@ -246,4 +246,12 @@ class MimeControllerTest < Test::Unit::TestCase
get :all_types_with_layout
assert_equal '<html>HTML for all_types_with_layout</html>', @response.body
end
end
def test_xhr
xhr :get, :js_or_html
assert_equal 'JS', @response.body
xhr :get, :using_defaults
assert_equal '$("body").visualEffect("highlight");', @response.body
end
end