@@ -761,7 +761,7 @@ def test_create_link_to_missing_object
761761 }
762762 }
763763
764- assert_response :unprocessable_entity
764+ assert_response unprocessable_status
765765 # TODO: check if this validation is working
766766 assert_match /author - can't be blank/ , response . body
767767 assert_nil response . location
@@ -864,7 +864,7 @@ def test_create_with_invalid_data
864864 }
865865 }
866866
867- assert_response :unprocessable_entity
867+ assert_response unprocessable_status
868868
869869 assert_equal "/data/relationships/author" , json_response [ 'errors' ] [ 0 ] [ 'source' ] [ 'pointer' ]
870870 assert_equal "can't be blank" , json_response [ 'errors' ] [ 0 ] [ 'title' ]
@@ -2019,7 +2019,7 @@ def test_delete_with_validation_error_base
20192019
20202020 assert_equal "can't destroy me" , json_response [ 'errors' ] [ 0 ] [ 'title' ]
20212021 assert_equal "/data" , json_response [ 'errors' ] [ 0 ] [ 'source' ] [ 'pointer' ]
2022- assert_response :unprocessable_entity
2022+ assert_response unprocessable_status
20232023 end
20242024
20252025 def test_delete_with_validation_error_attr
@@ -2028,7 +2028,7 @@ def test_delete_with_validation_error_attr
20282028
20292029 assert_equal "is locked" , json_response [ 'errors' ] [ 0 ] [ 'title' ]
20302030 assert_equal "/data/attributes/title" , json_response [ 'errors' ] [ 0 ] [ 'source' ] [ 'pointer' ]
2031- assert_response :unprocessable_entity
2031+ assert_response unprocessable_status
20322032 end
20332033
20342034 def test_delete_single
@@ -2631,7 +2631,7 @@ def test_create_validations_missing_attribute
26312631 }
26322632 }
26332633
2634- assert_response :unprocessable_entity
2634+ assert_response unprocessable_status
26352635 assert_equal 2 , json_response [ 'errors' ] . size
26362636 assert_equal JSONAPI ::VALIDATION_ERROR , json_response [ 'errors' ] [ 0 ] [ 'code' ]
26372637 assert_equal JSONAPI ::VALIDATION_ERROR , json_response [ 'errors' ] [ 1 ] [ 'code' ]
@@ -2653,7 +2653,7 @@ def test_update_validations_missing_attribute
26532653 }
26542654 }
26552655
2656- assert_response :unprocessable_entity
2656+ assert_response unprocessable_status
26572657 assert_equal 1 , json_response [ 'errors' ] . size
26582658 assert_equal JSONAPI ::VALIDATION_ERROR , json_response [ 'errors' ] [ 0 ] [ 'code' ]
26592659 assert_match /name - can't be blank/ , response . body
@@ -3183,7 +3183,7 @@ def test_create_with_invalid_data
31833183 }
31843184 }
31853185
3186- assert_response :unprocessable_entity
3186+ assert_response unprocessable_status
31873187
31883188 assert_equal "/data/attributes/spouse-name" , json_response [ 'errors' ] [ 0 ] [ 'source' ] [ 'pointer' ]
31893189 assert_equal "can't be blank" , json_response [ 'errors' ] [ 0 ] [ 'title' ]
@@ -3781,7 +3781,7 @@ def test_save_model_callbacks_fail
37813781 }
37823782 }
37833783
3784- assert_response :unprocessable_entity
3784+ assert_response unprocessable_status
37853785 assert_match /Save failed or was cancelled/ , json_response [ 'errors' ] [ 0 ] [ 'detail' ]
37863786 end
37873787end
@@ -4079,7 +4079,7 @@ def test_delete_with_validation_error_base_on_resource
40794079
40804080 assert_equal "can't destroy me" , json_response [ 'errors' ] [ 0 ] [ 'title' ]
40814081 assert_equal "/data/attributes/base" , json_response [ 'errors' ] [ 0 ] [ 'source' ] [ 'pointer' ]
4082- assert_response :unprocessable_entity
4082+ assert_response unprocessable_status
40834083 end
40844084end
40854085
0 commit comments