Skip to content

Test Mime::Type#html? predicate - #57542

Merged
rafaelfranca merged 1 commit into
rails:mainfrom
hammadxcm:test-mime-type-html-predicate
Jun 2, 2026
Merged

rafaelfranca merged 1 commit into
rails:mainfrom
hammadxcm:test-mime-type-html-predicate

Conversation

@hammadxcm

Copy link
Copy Markdown
Contributor

Mime::Type#html? is true when the symbol is :html or when the type string contains "html" (e.g. application/xhtml+xml), and false otherwise. The method had no direct test.

This adds coverage for both truthy paths (symbol match and string-substring match) and the false case. No production code changes — test-only.

Mime::Type#html? is true when the symbol is :html or when the type
string contains "html" (e.g. application/xhtml+xml), and false
otherwise. The method had no direct test.

Add coverage for both truthy paths and the false case.
@rafaelfranca
rafaelfranca merged commit de70175 into rails:main Jun 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants