mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-26 19:06:32 +00:00
Add RANKED_TFT_DOUBLE_UP (renamed version of RANKED_TFT_PAIRS)
This commit is contained in:
parent
056bacf67c
commit
b82a1725c1
2 changed files with 14 additions and 3 deletions
|
@ -3,11 +3,15 @@ use strum_macros::{ EnumString, Display, AsRefStr, IntoStaticStr };
|
|||
|
||||
/// LoL or TFT ranked queue types.
|
||||
#[non_exhaustive]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Eq, PartialEq, Hash)]
|
||||
#[derive(EnumString, Display, AsRefStr, IntoStaticStr)]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub enum QueueType {
|
||||
/// Catch-all variant for new, unknown queue types.
|
||||
#[strum(default)]
|
||||
UNKNOWN(String),
|
||||
|
||||
/// League of Legends, Summoner's Rift (5v5), Ranked Solo Queue.
|
||||
RANKED_SOLO_5x5,
|
||||
/// League of Legends, Summoner's Rift (5v5), Flex Queue.
|
||||
|
@ -19,7 +23,11 @@ pub enum QueueType {
|
|||
/// Ranked Teamfight Tactics, Hyper Roll gamemode.
|
||||
RANKED_TFT_TURBO,
|
||||
/// Ranked Teamfight Tactics, Double Up gamemode.
|
||||
RANKED_TFT_PAIRS
|
||||
RANKED_TFT_DOUBLE_UP,
|
||||
|
||||
/// Ranked Teamfight Tactics, OLD Double Up gamemode. Changed some time before June 2022.
|
||||
#[deprecated(note="Use RANKED_TFT_DOUBLE_UP instead.")]
|
||||
RANKED_TFT_PAIRS,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -54,7 +54,10 @@ async_tests!{
|
|||
let league_fut = RIOT_API.league_v4().get_league_entries_for_summoner(ROUTE, &*summoner.id);
|
||||
let league = league_fut.await.map_err(|e| e.to_string())?;
|
||||
rassert_eq!(1, league.len()); // BRITTLE!
|
||||
#[allow(deprecated)]
|
||||
{
|
||||
rassert_eq!(league[0].queue_type, QueueType::RANKED_TFT_PAIRS);
|
||||
}
|
||||
Ok(())
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue