From 7e2eb7e5a7da54571b750ce2f17905674a94cba0 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 31 Aug 2019 12:55:07 -0500 Subject: [PATCH] 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. --- test/functional/application_controller_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/application_controller_test.rb b/test/functional/application_controller_test.rb index 0b5e57170..5ff621fd7 100644 --- a/test/functional/application_controller_test.rb +++ b/test/functional/application_controller_test.rb @@ -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