Sort by <field>_sort from tags if it is available #107
@ -1211,6 +1211,9 @@ mod tests {
|
||||
|
||||
assert!(artist_2 < artist_1);
|
||||
|
||||
assert_eq!(artist_1, &music_hoard.collection[1]);
|
||||
assert_eq!(artist_2, &music_hoard.collection[0]);
|
||||
|
||||
music_hoard
|
||||
.set_artist_sort(artist_1_id.as_ref(), artist_1_sort.clone())
|
||||
.unwrap();
|
||||
@ -1220,12 +1223,18 @@ mod tests {
|
||||
|
||||
assert!(artist_1 < artist_2);
|
||||
|
||||
assert_eq!(artist_1, &music_hoard.collection[0]);
|
||||
assert_eq!(artist_2, &music_hoard.collection[1]);
|
||||
|
||||
music_hoard.clear_artist_sort(artist_1_id.as_ref()).unwrap();
|
||||
|
||||
let artist_1: &Artist = music_hoard.get_artist(&artist_1_id).unwrap();
|
||||
let artist_2: &Artist = music_hoard.get_artist(&artist_2_id).unwrap();
|
||||
|
||||
assert!(artist_2 < artist_1);
|
||||
|
||||
assert_eq!(artist_1, &music_hoard.collection[1]);
|
||||
assert_eq!(artist_2, &music_hoard.collection[0]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user