Wrapped test
This commit is contained in:
@@ -32,6 +32,11 @@ pub async fn fetch_wsdc_info(id: u32) -> Result<DanceInfo, DanceInfoError> {
|
|||||||
Ok(x.into())
|
Ok(x.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
#![allow(clippy::unwrap_used, reason="Allow unwrap in tests")]
|
||||||
|
use crate::worldsdc::fetch_wsdc_info;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore = "Only run when the mock api is setup"]
|
#[ignore = "Only run when the mock api is setup"]
|
||||||
fn test_fetch_wsdc() {
|
fn test_fetch_wsdc() {
|
||||||
@@ -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)]
|
||||||
|
|||||||
Reference in New Issue
Block a user