Update dependencies
This commit is contained in:
@ -24,7 +24,11 @@ impl Fixture {
|
||||
let mut path = PathBuf::from(&tempdir.path());
|
||||
path.push(&fixture_filename);
|
||||
|
||||
Fixture { _tempdir: tempdir, source, path }
|
||||
Fixture {
|
||||
_tempdir: tempdir,
|
||||
source,
|
||||
path,
|
||||
}
|
||||
}
|
||||
|
||||
fn copy(fixture_filename: &str) -> Self {
|
||||
@ -46,7 +50,6 @@ fn read_tag(path: &Path) -> id3::Tag {
|
||||
id3::Tag::read_from_path(path).unwrap()
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unsuccessful_image_embedding() {
|
||||
let song = Fixture::copy("attempt_1_no_image.mp3");
|
||||
@ -55,7 +58,11 @@ fn test_unsuccessful_image_embedding() {
|
||||
// Nonexistent files
|
||||
assert!(embed_image(&song, &PathBuf::from("nonexistent.jpg")).is_err());
|
||||
assert!(embed_image(&PathBuf::from("nonexistent.mp3"), &image).is_err());
|
||||
assert!(embed_image(&PathBuf::from("nonexistent.mp3"), &PathBuf::from("nonexistent.jpg")).is_err());
|
||||
assert!(embed_image(
|
||||
&PathBuf::from("nonexistent.mp3"),
|
||||
&PathBuf::from("nonexistent.jpg")
|
||||
)
|
||||
.is_err());
|
||||
|
||||
// Wrong kinds of files
|
||||
assert!(embed_image(&image, &song).is_err());
|
||||
|
Reference in New Issue
Block a user