You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
634 B
Rust
28 lines
634 B
Rust
3 years ago
|
use super::super::common;
|
||
|
use hydrus_api::wrapper::service::{Service, ServiceType, Services};
|
||
|
|
||
|
async fn get_services() -> Services {
|
||
|
let hydrus = common::get_hydrus();
|
||
|
hydrus.services().await.unwrap()
|
||
|
}
|
||
|
|
||
|
async fn get_file_service() -> Service {
|
||
|
let services = get_services().await;
|
||
|
services
|
||
|
.get_services(ServiceType::LocalFiles)
|
||
|
.pop()
|
||
|
.unwrap()
|
||
|
.clone()
|
||
|
}
|
||
|
|
||
|
#[tokio::test]
|
||
|
async fn it_searches_for_files() {
|
||
|
let service = get_file_service().await;
|
||
|
service
|
||
|
.search()
|
||
|
.add_tag("character:rimuru tempest".into())
|
||
|
.run()
|
||
|
.await
|
||
|
.unwrap();
|
||
|
}
|