feat: handle duplicate enum cases
This commit is contained in:
parent
12cfcf7f11
commit
2e60e0a24f
10 changed files with 1462 additions and 658 deletions
|
|
@ -10,7 +10,7 @@ pub(super) mod test {
|
|||
executor::{ExecutorExt, ReqwestClient},
|
||||
models::{
|
||||
faction_selection_name::FactionSelectionNameVariant, AttackCode,
|
||||
PersonalStatsCategoryEnum, PersonalStatsStatName, UserListEnum,
|
||||
PersonalStatsCategoryEnum, PersonalStatsStatName, UserId, UserListEnum,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -743,7 +743,7 @@ pub(super) mod test {
|
|||
|
||||
client
|
||||
.user()
|
||||
.bounties_for_id(986228.into(), |b| b)
|
||||
.bounties_for_id(UserId(986228).into(), |b| b)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
|
@ -807,7 +807,7 @@ pub(super) mod test {
|
|||
|
||||
client
|
||||
.user()
|
||||
.forumposts_for_id(1.into(), |b| b)
|
||||
.forumposts_for_id(UserId(1).into(), |b| b)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
|
@ -832,7 +832,7 @@ pub(super) mod test {
|
|||
|
||||
client
|
||||
.user()
|
||||
.forumthreads_for_id(1.into(), |b| b)
|
||||
.forumthreads_for_id(UserId(1).into(), |b| b)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
|
@ -848,7 +848,11 @@ pub(super) mod test {
|
|||
async fn user_hof_for_id() {
|
||||
let client = test_client().await;
|
||||
|
||||
client.user().hof_for_id(1.into(), |b| b).await.unwrap();
|
||||
client
|
||||
.user()
|
||||
.hof_for_id(UserId(1).into(), |b| b)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
@ -1094,7 +1098,7 @@ pub(super) mod test {
|
|||
|
||||
client
|
||||
.user()
|
||||
.personalstats_for_id(1.into(), |b| b.cat(PersonalStatsCategoryEnum::All))
|
||||
.personalstats_for_id(UserId(1).into(), |b| b.cat(PersonalStatsCategoryEnum::All))
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
|
@ -1147,7 +1151,11 @@ pub(super) mod test {
|
|||
|
||||
client.user().profile(|b| b).await.unwrap();
|
||||
|
||||
client.user().profile_for_id(4.into(), |b| b).await.unwrap();
|
||||
client
|
||||
.user()
|
||||
.profile_for_id(UserId(4).into(), |b| b)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue