mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user