Feature #43484 » 0002-Stop-using-legacy-image-x-ms-bmp-MIME-type-for-BMP-f.patch
| lib/redmine/mime_type.rb | ||
|---|---|---|
| 40 | 40 |
'text/csv' => 'csv', |
| 41 | 41 |
'text/x-po' => 'po', |
| 42 | 42 |
'image/avif' => 'avif', |
| 43 |
'image/bmp' => 'bmp', |
|
| 43 | 44 |
'image/gif' => 'gif', |
| 44 | 45 |
'image/jpeg' => 'jpg,jpeg,jpe', |
| 45 | 46 |
'image/png' => 'png', |
| 46 | 47 |
'image/tiff' => 'tiff,tif', |
| 47 | 48 |
'image/webp' => 'webp', |
| 48 |
'image/x-ms-bmp' => 'bmp', |
|
| 49 | 49 |
'application/javascript' => 'js', |
| 50 | 50 |
'application/pdf' => 'pdf', |
| 51 | 51 |
'video/mp4' => 'mp4', |
| test/unit/lib/redmine/mime_type_test.rb | ||
|---|---|---|
| 25 | 25 |
'test.txt' => 'text/plain', |
| 26 | 26 |
'test.c' => 'text/x-c', |
| 27 | 27 |
'test.avif' => 'image/avif', |
| 28 |
'test.bmp' => 'image/bmp', |
|
| 28 | 29 |
'TEST.JPG' => 'image/jpeg', |
| 29 | 30 |
} |
| 30 | 31 |
to_test.each do |name, expected| |
| ... | ... | |
| 81 | 82 |
def test_by_type |
| 82 | 83 |
image_types = Redmine::MimeType.by_type('image')
|
| 83 | 84 |
assert_includes image_types, 'image/avif' |
| 85 |
assert_includes image_types, 'image/bmp' |
|
| 84 | 86 |
assert_includes image_types, 'image/png' |
| 85 | 87 |
assert_includes image_types, 'image/webp' |
| 86 | 88 |
end |