Fix Rails 6 content_type deprecation warning.
DEPRECATION WARNING: Rails 6.1 will return Content-Type header without
modification. If you want just the MIME type, please use `#media_type`
instead.
This commit is contained in:
@@ -163,7 +163,7 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest
|
|||||||
get news_updates_path(format: :json)
|
get news_updates_path(format: :json)
|
||||||
|
|
||||||
assert_response 403
|
assert_response 403
|
||||||
assert_equal "application/json", response.content_type
|
assert_equal "application/json", response.media_type
|
||||||
assert_equal "Access denied", response.parsed_body["message"]
|
assert_equal "Access denied", response.parsed_body["message"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user