test: add `champion-master-v4` test for old summoner

val_queue
Mingwei Samuel 2024-04-17 10:24:37 -07:00
parent 267f5f096e
commit 09f5bbd299
1 changed files with 19 additions and 1 deletions

View File

@ -64,7 +64,7 @@ async fn leagueexp_get() -> Result<(), String> {
} }
#[riven_test] #[riven_test]
async fn champion_mastery_v4() -> Result<(), String> { async fn championmasteryv4_lugnutsk() -> Result<(), String> {
let summoner = riot_api() let summoner = riot_api()
.summoner_v4() .summoner_v4()
.get_by_summoner_name(ROUTE, "LugnutsK"); .get_by_summoner_name(ROUTE, "LugnutsK");
@ -80,6 +80,24 @@ async fn champion_mastery_v4() -> Result<(), String> {
Ok(()) Ok(())
} }
#[riven_test]
async fn championmasteryv4_getall_iamchanese123() -> Result<(), String> {
let summoner =
riot_api()
.account_v1()
.get_by_riot_id(ROUTE.to_regional(), "iamchanese123", "NA1");
let summoner = summoner
.await
.map_err(|e| e.to_string())?
.ok_or_else(|| "'LugnutsK' not found!".to_owned())?;
let masteries = riot_api()
.champion_mastery_v4()
.get_all_champion_masteries_by_puuid(ROUTE, &summoner.puuid);
let masteries = masteries.await.map_err(|e| e.to_string())?;
rassert_eq!(59, masteries.len());
Ok(())
}
// Commented out, requires special API key. // Commented out, requires special API key.
// /// LOR // /// LOR
// #[riven_test] // #[riven_test]