mirror of
https://github.com/chmln/handlr.git
synced 2024-11-14 21:49:27 +01:00
MimeType - fix tests
This commit is contained in:
parent
44efa593f8
commit
602b2dd153
1 changed files with 10 additions and 4 deletions
|
@ -92,14 +92,20 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn from_path() -> Result<()> {
|
fn from_path() -> Result<()> {
|
||||||
assert_eq!(MimeType::try_from(".")?.0.essence_str(), "inode/directory");
|
|
||||||
assert_eq!(MimeType::try_from("./tests/rust.vim")?.0, "text/plain");
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
MimeType::try_from("./tests/cat")?.0,
|
MimeType::try_from(Path::new("."))?.0.essence_str(),
|
||||||
|
"inode/directory"
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
MimeType::try_from(Path::new("./tests/rust.vim"))?.0,
|
||||||
|
"text/plain"
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
MimeType::try_from(Path::new("./tests/cat"))?.0,
|
||||||
"application/x-shellscript"
|
"application/x-shellscript"
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
MimeType::try_from("./tests/SettingsWidgetFdoSecrets.ui")?.0,
|
MimeType::try_from(Path::new("./tests/SettingsWidgetFdoSecrets.ui"))?.0,
|
||||||
"application/x-designer"
|
"application/x-designer"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue