Wrapped test

This commit is contained in:
Lukas Wölfer
2025-08-12 21:43:06 +02:00
parent 2faf8038fe
commit 22fa677d8a

View File

@@ -32,9 +32,14 @@ pub async fn fetch_wsdc_info(id: u32) -> Result<DanceInfo, DanceInfoError> {
Ok(x.into()) Ok(x.into())
} }
#[test] #[cfg(test)]
#[ignore = "Only run when the mock api is setup"] mod tests {
fn test_fetch_wsdc() { #![allow(clippy::unwrap_used, reason="Allow unwrap in tests")]
use crate::worldsdc::fetch_wsdc_info;
#[test]
#[ignore = "Only run when the mock api is setup"]
fn test_fetch_wsdc() {
let rt = match tokio::runtime::Builder::new_current_thread() let rt = match tokio::runtime::Builder::new_current_thread()
.enable_all() .enable_all()
.build() .build()
@@ -46,7 +51,9 @@ fn test_fetch_wsdc() {
} }
}; };
let x = rt.block_on(fetch_wsdc_info(7)); let x = rt.block_on(fetch_wsdc_info(7));
dbg!(x); dbg!(&x);
x.unwrap();
}
} }
#[derive(thiserror::Error, Debug)] #[derive(thiserror::Error, Debug)]