Commit 190d1b3 1 parent dc96280 commit 190d1b3 Copy full SHA for 190d1b3
File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -140,8 +140,8 @@ def resource_klass_name
140
140
end
141
141
142
142
def verify_content_type_header
143
- unless request . content_type == JSONAPI ::MEDIA_TYPE
144
- fail JSONAPI ::Exceptions ::UnsupportedMediaTypeError . new ( request . content_type )
143
+ unless request . media_type == JSONAPI ::MEDIA_TYPE
144
+ fail JSONAPI ::Exceptions ::UnsupportedMediaTypeError . new ( request . media_type )
145
145
end
146
146
true
147
147
rescue => e
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ module FunctionalHelpers
32
32
# end
33
33
# end
34
34
#
35
- # if @response.content_type
36
- # ct = @response.content_type
35
+ # if @response.media_type
36
+ # ct = @response.media_type
37
37
# elsif methods.include?('assert_response_response')
38
38
# ct = assert_response_response
39
39
# else
Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ class ActionDispatch::IntegrationTest
471
471
fixtures :all
472
472
473
473
def assert_jsonapi_response ( expected_status , msg = nil )
474
- media_type = Rails :: VERSION :: MAJOR >= 6 ? response . media_type : response . content_type
474
+ media_type = response . media_type
475
475
assert_equal JSONAPI ::MEDIA_TYPE , media_type
476
476
if status != expected_status && status >= 400
477
477
pp json_response rescue nil
You can’t perform that action at this time.
0 commit comments