aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-18 21:23:14 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-18 21:23:14 +0000
commitc0ad3b6b680b15578be616206c47165b17eb4f1a (patch)
tree8815b9dd47f137464ef7265086200fcb5eb04242 /actionpack
parentf6786f8dccc6f6ca91a08c3cbfa80625f9c6c993 (diff)
downloadrails-c0ad3b6b680b15578be616206c47165b17eb4f1a.tar.gz
rails-c0ad3b6b680b15578be616206c47165b17eb4f1a.tar.bz2
rails-c0ad3b6b680b15578be616206c47165b17eb4f1a.zip
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
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/mime_responds_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb
index 6fe14bf65b..e696a41cb5 100644
--- a/actionpack/test/controller/mime_responds_test.rb
+++ b/actionpack/test/controller/mime_responds_test.rb
@@ -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 \ No newline at end of file
+
+ 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