aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorSteven Soroka <ssoroka78@gmail.com>2011-07-28 00:01:29 -0400
committerSteven Soroka <ssoroka78@gmail.com>2012-05-06 00:27:45 -0500
commitec4045c02fb112937116f827c508c3680a495326 (patch)
tree1f4a750cfd143e5528bcd097b7ffdee0b7458337 /actionpack/test
parent3532200576bed84bedf3554336dfc92ce9ce1cab (diff)
downloadrails-ec4045c02fb112937116f827c508c3680a495326.tar.gz
rails-ec4045c02fb112937116f827c508c3680a495326.tar.bz2
rails-ec4045c02fb112937116f827c508c3680a495326.zip
added an integration test that checks ActionController::UnknownFormat renders 406 :not_acceptable
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/integration_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 877b91b563..9f2dbda25f 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -405,6 +405,15 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest
end
end
+ def test_request_with_bad_format
+ with_test_route_set do
+ xhr :get, '/get.php'
+ assert_equal 406, status
+ assert_response 406
+ assert_response :not_acceptable
+ end
+ end
+
def test_get_with_query_string
with_test_route_set do
get '/get_with_params?foo=bar'