use rsoundcloud::http::HttpClient as ReqwestClient;
use std::time::Duration;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_reqwest_client_new() {
let reqwest_client = reqwest::ClientBuilder::new()
.timeout(Duration::from_secs(5))
.build()
.unwrap();
let _http_client = ReqwestClient::new(reqwest_client);
assert!(true);
}
#[test]
fn test_reqwest_client_with_builder() {
let result = ReqwestClient::with_builder(|builder| {
builder.timeout(Duration::from_secs(15))
});
assert!(result.is_ok());
}
#[test]
fn test_reqwest_client_with_builder_error() {
let result = ReqwestClient::with_builder(|builder| {
builder.timeout(Duration::from_secs(0)) });
assert!(result.is_ok());
}
}