- # text/json is in invalid format, ActionController::UnknownFormat error is expected
- http_accept_format("text/json")
- get :index, :params => { :bbox => bbox }
- assert_response :internal_server_error, "text/json should fail"
+ # text/json is in invalid format, return HTTP 406 Not acceptable
+ accept_header = accept_format_header("text/json")
+ get map_path(:bbox => bbox), :headers => accept_header
+ assert_response :not_acceptable, "text/json should fail"
+
+ # image/jpeg is a format which we don't support, return HTTP 406 Not acceptable
+ accept_header = accept_format_header("image/jpeg")
+ get map_path(:bbox => bbox), :headers => accept_header
+ assert_response :not_acceptable, "text/json should fail"