mirror of
https://codeberg.org/demostf/api-test.git
synced 2026-06-03 17:44:07 +02:00
test for merging of reconnected player kills
This commit is contained in:
parent
a5cf0ab09f
commit
149271b220
1 changed files with 11 additions and 0 deletions
11
src/main.rs
11
src/main.rs
|
|
@ -309,6 +309,17 @@ async fn main() -> Result<()> {
|
||||||
.await?;
|
.await?;
|
||||||
assert_eq(list.len(), 1)?;
|
assert_eq(list.len(), 1)?;
|
||||||
assert_eq(list[0].id, 4)?;
|
assert_eq(list[0].id, 4)?;
|
||||||
|
|
||||||
|
let players = list[0].get_players(&client).await?;
|
||||||
|
let reconnected_player = players
|
||||||
|
.iter()
|
||||||
|
.find(|player| player.user.steam_id == SteamID::from(76561197998883586))
|
||||||
|
.expect("player not found");
|
||||||
|
|
||||||
|
// note that these include post-game kills so the exact values might need to change if the parser ever starts excluding those
|
||||||
|
assert_eq(reconnected_player.kills, 26)?;
|
||||||
|
assert_eq(reconnected_player.assists, 22)?;
|
||||||
|
assert_eq(reconnected_player.deaths, 14)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.await?;
|
.await?;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue