Add a new test to check that invalid canceledBy works correctly

This commit is contained in:
Kerollmops 2023-01-18 15:50:36 +01:00
parent 182eea1f17
commit d3c796af38
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -151,6 +151,21 @@ async fn list_tasks_type_filtered() {
assert_eq!(response["results"].as_array().unwrap().len(), 2);
}
#[actix_rt::test]
async fn list_tasks_invalid_canceled_by_filter() {
let server = Server::new().await;
let index = server.index("test");
index.create(None).await;
index.wait_task(0).await;
index
.add_documents(serde_json::from_str(include_str!("../assets/test_set.json")).unwrap(), None)
.await;
let (response, code) = index.filtered_tasks(&[], &[], &["0"]).await;
assert_eq!(code, 200, "{}", response);
assert_eq!(response["results"].as_array().unwrap().len(), 0);
}
#[actix_rt::test]
async fn list_tasks_status_and_type_filtered() {
let server = Server::new().await;