chore(torn-api): update schema
This commit is contained in:
parent
1c9b4123c3
commit
a90bcb00c4
4 changed files with 178 additions and 69 deletions
|
|
@ -11,7 +11,7 @@ pub(super) mod test {
|
|||
models::{
|
||||
faction_selection_name::FactionSelectionNameVariant,
|
||||
user_selection_name::UserSelectionNameVariant, AttackCode, PersonalStatsCategoryEnum,
|
||||
PersonalStatsStatName, UserListEnum, UserPersonalStatsPopular,
|
||||
PersonalStatsStatName, UserListEnum,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -919,6 +919,7 @@ pub(super) mod test {
|
|||
.unwrap();
|
||||
}
|
||||
|
||||
#[cfg(feature = "strum")]
|
||||
#[tokio::test]
|
||||
async fn user_personalstats_popular() {
|
||||
let client = test_client().await;
|
||||
|
|
@ -938,6 +939,141 @@ pub(super) mod test {
|
|||
.is_user_personal_stats_popular());
|
||||
}
|
||||
|
||||
#[cfg(feature = "strum")]
|
||||
#[tokio::test]
|
||||
async fn user_personalstats_all() {
|
||||
let client = test_client().await;
|
||||
|
||||
let resp = client
|
||||
.user()
|
||||
.for_selections(|b| {
|
||||
b.selections([UserSelectionNameVariant::Personalstats])
|
||||
.cat(PersonalStatsCategoryEnum::All)
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(resp
|
||||
.user_personal_stats_response()
|
||||
.unwrap()
|
||||
.is_user_personal_stats_full());
|
||||
}
|
||||
|
||||
#[cfg(feature = "strum")]
|
||||
#[tokio::test]
|
||||
async fn user_personalstats_cat_attacking() {
|
||||
let client = test_client().await;
|
||||
|
||||
let resp = client
|
||||
.user()
|
||||
.for_selections(|b| {
|
||||
b.selections([UserSelectionNameVariant::Personalstats])
|
||||
.cat(PersonalStatsCategoryEnum::Attacking)
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(resp
|
||||
.user_personal_stats_response()
|
||||
.unwrap()
|
||||
.try_as_user_personal_stats_category()
|
||||
.unwrap()
|
||||
.personalstats
|
||||
.is_personal_stats_attacking_public());
|
||||
}
|
||||
|
||||
#[cfg(feature = "strum")]
|
||||
#[tokio::test]
|
||||
async fn user_personalstats_cat_jobs() {
|
||||
let client = test_client().await;
|
||||
|
||||
let resp = client
|
||||
.user()
|
||||
.for_selections(|b| {
|
||||
b.selections([UserSelectionNameVariant::Personalstats])
|
||||
.cat(PersonalStatsCategoryEnum::Jobs)
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(resp
|
||||
.user_personal_stats_response()
|
||||
.unwrap()
|
||||
.try_as_user_personal_stats_category()
|
||||
.unwrap()
|
||||
.personalstats
|
||||
.is_personal_stats_jobs_public());
|
||||
}
|
||||
|
||||
#[cfg(feature = "strum")]
|
||||
#[tokio::test]
|
||||
async fn user_personalstats_cat_trading() {
|
||||
let client = test_client().await;
|
||||
|
||||
let resp = client
|
||||
.user()
|
||||
.for_selections(|b| {
|
||||
b.selections([UserSelectionNameVariant::Personalstats])
|
||||
.cat(PersonalStatsCategoryEnum::Trading)
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(resp
|
||||
.user_personal_stats_response()
|
||||
.unwrap()
|
||||
.try_as_user_personal_stats_category()
|
||||
.unwrap()
|
||||
.personalstats
|
||||
.is_personal_stats_trading());
|
||||
}
|
||||
|
||||
#[cfg(feature = "strum")]
|
||||
#[tokio::test]
|
||||
async fn user_personalstats_cat_jail() {
|
||||
let client = test_client().await;
|
||||
|
||||
let resp = client
|
||||
.user()
|
||||
.for_selections(|b| {
|
||||
b.selections([UserSelectionNameVariant::Personalstats])
|
||||
.cat(PersonalStatsCategoryEnum::Jail)
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(resp
|
||||
.user_personal_stats_response()
|
||||
.unwrap()
|
||||
.try_as_user_personal_stats_category()
|
||||
.unwrap()
|
||||
.personalstats
|
||||
.is_personal_stats_jail());
|
||||
}
|
||||
|
||||
#[cfg(feature = "strum")]
|
||||
#[tokio::test]
|
||||
async fn user_personalstats_cat_hospital() {
|
||||
let client = test_client().await;
|
||||
|
||||
let resp = client
|
||||
.user()
|
||||
.for_selections(|b| {
|
||||
b.selections([UserSelectionNameVariant::Personalstats])
|
||||
.cat(PersonalStatsCategoryEnum::Hospital)
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(resp
|
||||
.user_personal_stats_response()
|
||||
.unwrap()
|
||||
.try_as_user_personal_stats_category()
|
||||
.unwrap()
|
||||
.personalstats
|
||||
.is_personal_stats_hospital());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn user_personalstats_for_id() {
|
||||
let client = test_client().await;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue