mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
Add a new test to check that invalid canceledBy works correctly
This commit is contained in:
parent
182eea1f17
commit
d3c796af38
@ -151,6 +151,21 @@ async fn list_tasks_type_filtered() {
|
|||||||
assert_eq!(response["results"].as_array().unwrap().len(), 2);
|
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]
|
#[actix_rt::test]
|
||||||
async fn list_tasks_status_and_type_filtered() {
|
async fn list_tasks_status_and_type_filtered() {
|
||||||
let server = Server::new().await;
|
let server = Server::new().await;
|
||||||
|
Loading…
Reference in New Issue
Block a user