The code in response_content_type gives the error message you’re encountering if this function returns false:
Here {part, subpart} will be {"image", "png"}, so you’ll need to pass a format that passes one of the three conditions:
- matches the result of running
MIME.extensions("image/png")-["png"]on my system - is equal to
subpart - is at the end of the subpart preceded by a
+
The third condition doesn’t seem relevant, and the other two are the same. You should pass :png to response_content_type. You may not need the =~ part unless you’re doing something unusual:
assert response_content_type(conn, :png)






















