implements the reverse query parameter for the batches

This commit is contained in:
Tamo 2024-11-20 13:29:52 +01:00
parent 8ad68dd708
commit a7ac590e9e
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
3 changed files with 119 additions and 22 deletions

View file

@ -114,6 +114,33 @@ async fn batch_bad_from() {
"#);
}
#[actix_rt::test]
async fn bask_bad_reverse() {
let server = Server::new_shared();
let (response, code) = server.batches_filter("reverse=doggo").await;
snapshot!(code, @"400 Bad Request");
snapshot!(response, @r###"
{
"message": "Invalid value in parameter `reverse`: could not parse `doggo` as a boolean, expected either `true` or `false`",
"code": "invalid_task_reverse",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#invalid_task_reverse"
}
"###);
let (response, code) = server.batches_filter("reverse=*").await;
snapshot!(code, @"400 Bad Request");
snapshot!(response, @r###"
{
"message": "Invalid value in parameter `reverse`: could not parse `*` as a boolean, expected either `true` or `false`",
"code": "invalid_task_reverse",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#invalid_task_reverse"
}
"###);
}
#[actix_rt::test]
async fn batch_bad_after_enqueued_at() {
let server = Server::new_shared();