// ██████╗ █████╗ ███████╗███████╗██╗███╗ ██╗ ██████╗ // ██╔══██╗██╔══██╗██╔════╝██╔════╝██║████╗ ██║██╔════╝ // ██████╔╝███████║███████╗███████╗██║██╔██╗ ██║██║ ███╗ // ██╔═══╝ ██╔══██║╚════██║╚════██║██║██║╚██╗██║██║ ██║ // ██║ ██║ ██║███████║███████║██║██║ ╚████║╚██████╔╝ // ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝╚═╝ ╚═══╝ ╚═════╝ #[cfg(test)] mod passing { use crate::utils; #[test] fn image_gif87() { assert_eq!(utils::detect_media_type(b"GIF87a", ""), "image/gif"); } #[test] fn image_gif89() { assert_eq!(utils::detect_media_type(b"GIF89a", ""), "image/gif"); } #[test] fn image_jpeg() { assert_eq!(utils::detect_media_type(b"\xFF\xD8\xFF", ""), "image/jpeg"); } #[test] fn image_png() { assert_eq!( utils::detect_media_type(b"\x89PNG\x0D\x0A\x1A\x0A", ""), "image/png" ); } #[test] fn image_svg() { assert_eq!(utils::detect_media_type(b"