Skip to content

Commit f24f278

Browse files
authored
Merge pull request #2484 from ham0215/feature/rails61
Fix content_type comparison from eq to match
2 parents 0755dd4 + cfc7b83 commit f24f278

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/generators/rspec/scaffold/templates/api_request_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
post <%= index_helper %>_url,
8181
params: { <%= ns_file_name %>: invalid_attributes }, headers: valid_headers, as: :json
8282
expect(response).to have_http_status(:unprocessable_entity)
83-
expect(response.content_type).to eq("application/json")
83+
expect(response.content_type).to match(a_string_including("application/json"))
8484
end
8585
end
8686
end
@@ -114,7 +114,7 @@
114114
patch <%= show_helper.tr('@', '') %>,
115115
params: { <%= singular_table_name %>: invalid_attributes }, headers: valid_headers, as: :json
116116
expect(response).to have_http_status(:unprocessable_entity)
117-
expect(response.content_type).to eq("application/json")
117+
expect(response.content_type).to match(a_string_including("application/json"))
118118
end
119119
end
120120
end

0 commit comments

Comments
 (0)