Add a new test to check that invalid canceledBy works correctly
@@ -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;
