From 1c4cadb6d913a5d3a4053d426f700594d8e8d805 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Fri, 21 May 2021 22:20:16 -0700 Subject: [PATCH] Add matchlist test with mult-champion query string --- tests/tests_na.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/tests_na.rs b/tests/tests_na.rs index 59bdf4d..83e6416 100644 --- a/tests/tests_na.rs +++ b/tests/tests_na.rs @@ -49,7 +49,6 @@ async_tests!{ }, matchlist_get: 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, Some(2500), None, None, Some(2600), None, None); @@ -57,6 +56,14 @@ async_tests!{ rassert!(m.matches.len() > 0, "Matchlist should not be empty"); 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 { let p = RIOT_API.match_v4().get_match(ROUTE, 3190191338);