Compare commits

...

1 Commits

Author SHA1 Message Date
Polochon-street
8fad7701af Add a "no tags" test for the library module 2022-10-24 10:07:19 +02:00

View File

@ -2150,6 +2150,17 @@ mod test {
}
}
#[test]
fn test_no_tags() {
let (mut library, _temp_dir, _) = setup_test_library();
library.config.base_config_mut().features_version = 0;
let paths = vec!["./data/no_tags.flac"];
library.analyze_paths(paths.to_owned(), false).unwrap();
let song = library.song_from_path::<()>("./data/no_tags.flac").unwrap();
assert_eq!(None, song.bliss_song.title);
}
#[test]
fn test_analyze_paths() {
let (mut library, _temp_dir, _) = setup_test_library();
@ -2168,7 +2179,7 @@ mod test {
_library_song_from_database(connection, path)
})
.collect::<Vec<LibrarySong<()>>>();
let expected_songs = paths[..2]
let expected_songs = paths[..3]
.iter()
.zip(vec![(), ()].into_iter())
.map(|(path, expected_extra_info)| LibrarySong {