// Search by maintainer use aur_rs::{Request, ReturnData}; use httpmock::prelude::*; mod common; #[tokio::test] async fn search_package_by_maintainer() { let kit = common::setup(); let search_mock = kit.mock_server.mock(|when, then| { when.method(GET).path("/rpc/v5/search/jguer"); then.status(200).body(kit.valid_maintainer_json.clone()); }); let url = kit.mock_server.url("/rpc/v5"); let request = Request { endpoint: url.to_string(), }; let response: ReturnData = request.search_package_by_maintainer("jguer").await.unwrap(); search_mock.assert(); assert_eq!(response.results[1].name, "votar-git"); }