Coverage
All checks were successful
Cargo CI / Build and Test (pull_request) Successful in 2m1s
Cargo CI / Lint (pull_request) Successful in 1m6s

This commit is contained in:
Wojciech Kozlowski 2024-08-31 22:20:39 +02:00
parent c04fdcd23c
commit 13a31e0d7f
2 changed files with 9 additions and 4 deletions

View File

@ -316,6 +316,7 @@ mod tests {
assert_ne!(album_1, album_2);
assert!(album_1 < album_2);
assert!(album_1.meta < album_2.meta);
}
#[test]

View File

@ -257,6 +257,8 @@ mod tests {
assert_eq!(artist.get_sort_key(), (&artist_id,));
assert!(artist < Artist::new(sort_id_1.clone()));
assert!(artist < Artist::new(sort_id_2.clone()));
assert!(artist.meta < ArtistMeta::new(sort_id_1.clone()));
assert!(artist.meta < ArtistMeta::new(sort_id_2.clone()));
artist.set_sort_key(sort_id_1.clone());
@ -265,22 +267,24 @@ mod tests {
assert_eq!(artist.get_sort_key(), (&sort_id_1,));
assert!(artist > Artist::new(artist_id.clone()));
assert!(artist < Artist::new(sort_id_2.clone()));
assert!(artist.meta > ArtistMeta::new(artist_id.clone()));
assert!(artist.meta < ArtistMeta::new(sort_id_2.clone()));
artist.set_sort_key(sort_id_2.clone());
assert_eq!(artist.meta.id, artist_id);
assert_eq!(artist.meta.sort.as_ref(), Some(&sort_id_2));
assert_eq!(artist.get_sort_key(), (&sort_id_2,));
assert!(artist > Artist::new(artist_id.clone()));
assert!(artist > Artist::new(sort_id_1.clone()));
assert!(artist.meta > ArtistMeta::new(artist_id.clone()));
assert!(artist.meta > ArtistMeta::new(sort_id_1.clone()));
artist.clear_sort_key();
assert_eq!(artist.meta.id, artist_id);
assert_eq!(artist.meta.sort, None);
assert_eq!(artist.get_sort_key(), (&artist_id,));
assert!(artist < Artist::new(sort_id_1.clone()));
assert!(artist < Artist::new(sort_id_2.clone()));
assert!(artist.meta < ArtistMeta::new(sort_id_1.clone()));
assert!(artist.meta < ArtistMeta::new(sort_id_2.clone()));
}
#[test]