Feature #43484 » 0002-Stop-using-legacy-image-x-ms-bmp-MIME-type-for-BMP-f.patch
| lib/redmine/mime_type.rb | ||
|---|---|---|
|
'text/csv' => 'csv',
|
||
|
'text/x-po' => 'po',
|
||
|
'image/avif' => 'avif',
|
||
|
'image/bmp' => 'bmp',
|
||
|
'image/gif' => 'gif',
|
||
|
'image/jpeg' => 'jpg,jpeg,jpe',
|
||
|
'image/png' => 'png',
|
||
|
'image/tiff' => 'tiff,tif',
|
||
|
'image/webp' => 'webp',
|
||
|
'image/x-ms-bmp' => 'bmp',
|
||
|
'application/javascript' => 'js',
|
||
|
'application/pdf' => 'pdf',
|
||
|
'video/mp4' => 'mp4',
|
||
| test/unit/lib/redmine/mime_type_test.rb | ||
|---|---|---|
|
'test.txt' => 'text/plain',
|
||
|
'test.c' => 'text/x-c',
|
||
|
'test.avif' => 'image/avif',
|
||
|
'test.bmp' => 'image/bmp',
|
||
|
'TEST.JPG' => 'image/jpeg',
|
||
|
}
|
||
|
to_test.each do |name, expected|
|
||
| ... | ... | |
|
def test_by_type
|
||
|
image_types = Redmine::MimeType.by_type('image')
|
||
|
assert_includes image_types, 'image/avif'
|
||
|
assert_includes image_types, 'image/bmp'
|
||
|
assert_includes image_types, 'image/png'
|
||
|
assert_includes image_types, 'image/webp'
|
||
|
end
|
||