#[cfg(feature = "async")]
mod async_error_tests {
use gouqi::*;
use serde::de::Error as SerdeError;
#[test]
fn test_async_error_parsing() {
let error = Error::Serde(serde_json::Error::custom(String::from("test error")));
assert!(matches!(error, Error::Serde(_)));
}
#[test]
fn test_async_error_types() {
let unauthorized = Error::Unauthorized;
assert!(matches!(unauthorized, Error::Unauthorized));
let not_found = Error::NotFound;
assert!(matches!(not_found, Error::NotFound));
let method_not_allowed = Error::MethodNotAllowed;
assert!(matches!(method_not_allowed, Error::MethodNotAllowed));
}
}