Add search tests
This commit is contained in:
parent
3ffc5a548f
commit
3ba7ee65c8
21
qbittorrent-web-api-gen/tests/access_search.rs
Normal file
21
qbittorrent-web-api-gen/tests/access_search.rs
Normal file
|
@ -0,0 +1,21 @@
|
|||
use anyhow::Result;
|
||||
use qbittorrent_web_api_gen::QBittorrentApiGen;
|
||||
|
||||
const USERNAME: &str = "admin";
|
||||
const PASSWORD: &str = "adminadmin";
|
||||
const BASE_URL: &str = "http://localhost:8080";
|
||||
|
||||
#[derive(QBittorrentApiGen)]
|
||||
struct Api {}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
let api = Api::login(BASE_URL, USERNAME, PASSWORD).await?;
|
||||
|
||||
let _ = api.search().delete(1).send().await?;
|
||||
let _ = api.search().plugins().await?;
|
||||
let _ = api.search().plugins().await?;
|
||||
let _ = api.search().install_plugin("https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py").send().await?;
|
||||
|
||||
Ok(())
|
||||
}
|
|
@ -19,4 +19,5 @@ fn tests() {
|
|||
t.pass("tests/add_torrent.rs");
|
||||
t.pass("tests/another_struct_name.rs");
|
||||
t.pass("tests/access_impl_types.rs");
|
||||
t.pass("tests/search_types.rs");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user