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