Skip to content
This repository
Browse code

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
  • Loading branch information...
commit c0ad3b6b680b15578be616206c47165b17eb4f1a 1 parent f6786f8
David Heinemeier Hansson authored March 18, 2006
10  actionpack/test/controller/mime_responds_test.rb
@@ -246,4 +246,12 @@ def test_all_types_with_layout
246 246
     get :all_types_with_layout
247 247
     assert_equal '<html>HTML for all_types_with_layout</html>', @response.body
248 248
   end
249  
-end
  249
+
  250
+  def test_xhr
  251
+    xhr :get, :js_or_html
  252
+    assert_equal 'JS', @response.body
  253
+
  254
+    xhr :get, :using_defaults
  255
+    assert_equal '$("body").visualEffect("highlight");', @response.body
  256
+  end
  257
+end

0 notes on commit c0ad3b6

Please sign in to comment.
Something went wrong with that request. Please try again.