test fixes

This commit is contained in:
Robin Appelman 2022-05-12 22:46:44 +02:00
commit 4ec9516902
2 changed files with 3 additions and 3 deletions

View file

@ -177,7 +177,7 @@ impl ApiClient {
/// println!("{}: {}", demo.id, demo.name); /// println!("{}: {}", demo.id, demo.name);
/// println!("players:"); /// println!("players:");
/// ///
/// for player in demo.players { /// for player in demo.players.unwrap_or_default() {
/// println!("{}", player.user.name); /// println!("{}", player.user.name);
/// } /// }
/// # Ok(()) /// # Ok(())

View file

@ -151,7 +151,7 @@ async fn test_get_demo() {
SteamID::from(76561198024494988) SteamID::from(76561198024494988)
); );
let mut players = demo.players; let mut players = demo.players.unwrap();
players.sort_by(|a, b| { players.sort_by(|a, b| {
a.user a.user
.steam_id .steam_id
@ -185,7 +185,7 @@ async fn test_get_players() {
.await .await
.unwrap(); .unwrap();
assert_eq!(demos[0].players.len(), 0); assert!(demos[0].players.is_none());
assert_eq!(demos[0].get_players(&client).await.unwrap().len(), 12); assert_eq!(demos[0].get_players(&client).await.unwrap().len(), 12);
} }