This commit is contained in:
Wojciech Kozlowski 2023-05-21 17:02:06 +02:00
parent 5108ddf7a3
commit 001f0e2dfc

View File

@ -59,7 +59,7 @@ impl MusicBrainz {
} }
match url.path_segments().and_then(|mut ps| ps.nth(1)) { match url.path_segments().and_then(|mut ps| ps.nth(1)) {
Some(segment) => Uuid::try_parse(&segment)?, Some(segment) => Uuid::try_parse(segment)?,
None => return Err(Self::invalid_url_error(url).into()), None => return Err(Self::invalid_url_error(url).into()),
}; };
@ -788,7 +788,10 @@ mod tests {
let mut music_hoard = MusicHoard::new(library, database); let mut music_hoard = MusicHoard::new(library, database);
music_hoard.rescan_library().unwrap(); music_hoard.rescan_library().unwrap();
assert_eq!(music_hoard.get_collection(), &clean_collection(COLLECTION.to_owned())); assert_eq!(
music_hoard.get_collection(),
&clean_collection(COLLECTION.to_owned())
);
} }
#[test] #[test]
@ -812,7 +815,10 @@ mod tests {
let mut music_hoard = MusicHoard::new(library, database); let mut music_hoard = MusicHoard::new(library, database);
music_hoard.rescan_library().unwrap(); music_hoard.rescan_library().unwrap();
assert_eq!(music_hoard.get_collection(), &clean_collection(COLLECTION.to_owned())); assert_eq!(
music_hoard.get_collection(),
&clean_collection(COLLECTION.to_owned())
);
} }
#[test] #[test]
@ -884,7 +890,10 @@ mod tests {
let mut music_hoard = MusicHoard::new(library, database); let mut music_hoard = MusicHoard::new(library, database);
music_hoard.rescan_library().unwrap(); music_hoard.rescan_library().unwrap();
assert_eq!(music_hoard.get_collection(), &clean_collection(COLLECTION.to_owned())); assert_eq!(
music_hoard.get_collection(),
&clean_collection(COLLECTION.to_owned())
);
music_hoard.save_to_database().unwrap(); music_hoard.save_to_database().unwrap();
} }