Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@21393
e93f8b46-1217-0410-a6f0-
8f06a7374b81
assert_response :no_content
assert_equal '', response.body
end
+
+ def test_api_with_invalid_format_should_return_406
+ get '/users/1', :headers => credentials('admin').merge({'Accept' => 'application/xml', 'Content-type' => 'application/xml'})
+
+ assert_response :not_acceptable
+ assert_equal "We couldn't handle your request, sorry. If you were trying to access the API, make sure to append .json or .xml to your request URL.\n", response.body
+ end
end