Skip to content

Commit

Permalink
Merge pull request #2484 from ham0215/feature/rails61
Browse files Browse the repository at this point in the history
Fix content_type comparison from eq to match
  • Loading branch information
pirj committed Mar 13, 2021
2 parents 0755dd4 + cfc7b83 commit f24f278
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/generators/rspec/scaffold/templates/api_request_spec.rb
Expand Up @@ -80,7 +80,7 @@
post <%= index_helper %>_url,
params: { <%= ns_file_name %>: invalid_attributes }, headers: valid_headers, as: :json
expect(response).to have_http_status(:unprocessable_entity)
expect(response.content_type).to eq("application/json")
expect(response.content_type).to match(a_string_including("application/json"))
end
end
end
Expand Down Expand Up @@ -114,7 +114,7 @@
patch <%= show_helper.tr('@', '') %>,
params: { <%= singular_table_name %>: invalid_attributes }, headers: valid_headers, as: :json
expect(response).to have_http_status(:unprocessable_entity)
expect(response.content_type).to eq("application/json")
expect(response.content_type).to match(a_string_including("application/json"))
end
end
end
Expand Down

0 comments on commit f24f278

Please sign in to comment.