forked from mirror/Riven
1
0
Fork 0

Add matchlist test with mult-champion query string

users/mingwei/unknown-variant-messy
Mingwei Samuel 2021-05-21 22:20:16 -07:00
parent 20d5196f13
commit 1c4cadb6d9
1 changed files with 8 additions and 1 deletions

View File

@ -49,7 +49,6 @@ async_tests!{
}, },
matchlist_get: async { matchlist_get: async {
let sp = RIOT_API.summoner_v4().get_by_summoner_name(ROUTE, "haha yes"); let sp = RIOT_API.summoner_v4().get_by_summoner_name(ROUTE, "haha yes");
let s = sp.await.map_err(|e| e.to_string())?.ok_or("Failed to get \"haha yes\"".to_owned())?; let s = sp.await.map_err(|e| e.to_string())?.ok_or("Failed to get \"haha yes\"".to_owned())?;
let mp = RIOT_API.match_v4().get_matchlist(ROUTE, &s.account_id, None, Some(2500), None, None, Some(2600), None, None); let mp = RIOT_API.match_v4().get_matchlist(ROUTE, &s.account_id, None, Some(2500), None, None, Some(2600), None, None);
@ -57,6 +56,14 @@ async_tests!{
rassert!(m.matches.len() > 0, "Matchlist should not be empty"); rassert!(m.matches.len() > 0, "Matchlist should not be empty");
Ok(()) Ok(())
}, },
matchlist_get2: async {
let sp = RIOT_API.summoner_v4().get_by_summoner_name(ROUTE, "haha yes");
let s = sp.await.map_err(|e| e.to_string())?.ok_or("Failed to get \"haha yes\"".to_owned())?;
let mp = RIOT_API.match_v4().get_matchlist(ROUTE, &s.account_id, None, None, Some(&[ Champion::Sion, Champion::Sivir, Champion::Cassiopeia ]), None, None, None, None);
let m = mp.await.map_err(|e| e.to_string())?.ok_or("Failed to get matchlist".to_owned())?;
rassert!(m.matches.len() > 0, "Matchlist should not be empty");
Ok(())
},
match_get: async { match_get: async {
let p = RIOT_API.match_v4().get_match(ROUTE, 3190191338); let p = RIOT_API.match_v4().get_match(ROUTE, 3190191338);