1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activestorage/test
Alex Ghiculescu 550d728bd1 Active Storage: incorrect defaults
https://github.com/rails/rails/pull/42225 identified that some of the content types used as defaults by Active Storage aren't recognized by `mini_mime`. This means that in practice code like [this](https://github.com/rails/rails/pull/42225/files#diff-7a3ec24c556b138abdbd67066ab5125b73528e45891d83142e417d3944194128R116) will crash or not function correctly. In [this](https://github.com/rails/rails/pull/42225/files#diff-c2010824d2d2e8d841ff4fc058c264c12d870e893025b153e6de571fba6b6c6cR194) example, a file with content_type `image/jpg` is treated as a PNG by the representer, since `image/jpg` isn't a valid content type according to `mini_mime`.

I don't think the default content_types should include formats that have never actually worked, so I'm proposing we remove them from the defaults.
2021-09-22 16:38:52 -05:00
..
analyzer Instrument ActiveStorage analyzers 2021-08-17 16:55:05 +09:00
controllers Merge pull request #42960 from FestaLab/activestorage/unsafe-redirect 2021-08-16 15:29:52 +02:00
database Fix ActiveStorage tests for load_defaults 7.0 2021-06-21 07:44:33 +09:00
dummy Generate less initializers in new/upgraded Rails apps (part 2) (#43237) 2021-09-17 09:06:17 +02:00
fixtures Reduce file size of tiff image in Active Storage 2021-08-12 11:37:44 -03:00
jobs Correct test class name 2019-09-28 10:31:26 -04:00
models Active Storage: incorrect defaults 2021-09-22 16:38:52 -05:00
previewer Active Storage: raise PreviewError when a preview cannot be generated 2021-02-26 14:06:52 -05:00
service Slient the warning for ActiveStorage::Current.host logged in test cases 2021-08-10 21:58:01 +05:30
template Make vips the default variant processor for new apps 2021-07-14 14:26:43 -03:00
urls Make vips the default variant processor for new apps 2021-07-14 14:26:43 -03:00
engine_test.rb Active Storage: incorrect defaults 2021-09-22 16:38:52 -05:00
fixture_set_test.rb Fix Flaky ActiveStorage test (#41225) 2021-01-24 18:29:11 +01:00
javascript_package_test.rb Enforce that activestorage compiled JS is in sync with source code 2019-10-18 18:02:02 -07:00
migrations_test.rb Respect Active Record's primary_key_type in Active Storage migrations 2021-06-11 11:51:07 +03:00
test_helper.rb Depend on ruby/debug, replacing Byebug 2021-09-08 17:35:41 +02:00