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:
evazion
2019-08-31 12:55:07 -05:00
parent 836ec02265
commit 7e2eb7e5a7

View File

@@ -163,7 +163,7 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest
get news_updates_path(format: :json)
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"]
end
end