Test ContentDisposition.format class method by hammadxcm · Pull Request #57546 · rails/rails · GitHub
Skip to content

Test ContentDisposition.format class method - #57546

Merged
rafaelfranca merged 1 commit into
rails:mainfrom
hammadxcm:test-content-disposition-format
Jun 2, 2026
Merged

rafaelfranca merged 1 commit into
rails:mainfrom
hammadxcm:test-content-disposition-format

Conversation

@hammadxcm

Copy link
Copy Markdown
Contributor

ActionDispatch::Http::ContentDisposition.format is the public shortcut that builds the header string (used by data streaming and ActiveStorage), but every existing test constructed an instance and called #to_s directly — the class method itself was never exercised.

This adds coverage for .format with and without a filename. No production code changes — test-only.

ActionDispatch::Http::ContentDisposition.format is the public
shortcut that builds the header string (used by data streaming and
ActiveStorage), but every test built an instance and called #to_s
directly. The class method itself was untested.

Add coverage for .format with and without a filename.
@rafaelfranca
rafaelfranca merged commit a575a3e into rails:main Jun 2, 2026
3 of 4 checks passed
rafaelfranca added a commit to matthewbjones/rails that referenced this pull request Jun 2, 2026
…n-format

Test ContentDisposition.format class method
rafaelfranca added a commit to matthewbjones/rails that referenced this pull request Jun 2, 2026
…n-format

Test ContentDisposition.format class method
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