test: add map_playlist_cont test
This commit is contained in:
parent
4f48ad59bd
commit
39fca50731
4 changed files with 23637 additions and 0 deletions
|
|
@ -252,4 +252,21 @@ mod tests {
|
|||
".last_update" => "[date]"
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn map_playlist_cont() {
|
||||
let json_path = Path::new("testfiles/playlist/playlist_cont.json");
|
||||
let json_file = File::open(json_path).unwrap();
|
||||
|
||||
let playlist: response::PlaylistCont =
|
||||
serde_json::from_reader(BufReader::new(json_file)).unwrap();
|
||||
let map_res = playlist.map_response("", Language::En, None).unwrap();
|
||||
|
||||
assert!(
|
||||
map_res.warnings.is_empty(),
|
||||
"deserialization/mapping warnings: {:?}",
|
||||
map_res.warnings
|
||||
);
|
||||
insta::assert_ron_snapshot!("map_playlist_cont", map_res.c);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Reference in a new issue