Coverage
This commit is contained in:
parent
c04fdcd23c
commit
13a31e0d7f
@ -316,6 +316,7 @@ mod tests {
|
|||||||
|
|
||||||
assert_ne!(album_1, album_2);
|
assert_ne!(album_1, album_2);
|
||||||
assert!(album_1 < album_2);
|
assert!(album_1 < album_2);
|
||||||
|
assert!(album_1.meta < album_2.meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -257,6 +257,8 @@ mod tests {
|
|||||||
assert_eq!(artist.get_sort_key(), (&artist_id,));
|
assert_eq!(artist.get_sort_key(), (&artist_id,));
|
||||||
assert!(artist < Artist::new(sort_id_1.clone()));
|
assert!(artist < Artist::new(sort_id_1.clone()));
|
||||||
assert!(artist < Artist::new(sort_id_2.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());
|
artist.set_sort_key(sort_id_1.clone());
|
||||||
|
|
||||||
@ -265,22 +267,24 @@ mod tests {
|
|||||||
assert_eq!(artist.get_sort_key(), (&sort_id_1,));
|
assert_eq!(artist.get_sort_key(), (&sort_id_1,));
|
||||||
assert!(artist > Artist::new(artist_id.clone()));
|
assert!(artist > Artist::new(artist_id.clone()));
|
||||||
assert!(artist < Artist::new(sort_id_2.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());
|
artist.set_sort_key(sort_id_2.clone());
|
||||||
|
|
||||||
assert_eq!(artist.meta.id, artist_id);
|
assert_eq!(artist.meta.id, artist_id);
|
||||||
assert_eq!(artist.meta.sort.as_ref(), Some(&sort_id_2));
|
assert_eq!(artist.meta.sort.as_ref(), Some(&sort_id_2));
|
||||||
assert_eq!(artist.get_sort_key(), (&sort_id_2,));
|
assert_eq!(artist.get_sort_key(), (&sort_id_2,));
|
||||||
assert!(artist > Artist::new(artist_id.clone()));
|
assert!(artist.meta > ArtistMeta::new(artist_id.clone()));
|
||||||
assert!(artist > Artist::new(sort_id_1.clone()));
|
assert!(artist.meta > ArtistMeta::new(sort_id_1.clone()));
|
||||||
|
|
||||||
artist.clear_sort_key();
|
artist.clear_sort_key();
|
||||||
|
|
||||||
assert_eq!(artist.meta.id, artist_id);
|
assert_eq!(artist.meta.id, artist_id);
|
||||||
assert_eq!(artist.meta.sort, None);
|
assert_eq!(artist.meta.sort, None);
|
||||||
assert_eq!(artist.get_sort_key(), (&artist_id,));
|
assert_eq!(artist.get_sort_key(), (&artist_id,));
|
||||||
assert!(artist < Artist::new(sort_id_1.clone()));
|
assert!(artist.meta < ArtistMeta::new(sort_id_1.clone()));
|
||||||
assert!(artist < Artist::new(sort_id_2.clone()));
|
assert!(artist.meta < ArtistMeta::new(sort_id_2.clone()));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user