create and use the error code

This commit is contained in:
Tamo 2023-05-02 17:46:04 +02:00 committed by Louis Dureuil
parent 143acb9cdc
commit 0548ab9038
No known key found for this signature in database
6 changed files with 42 additions and 19 deletions

View file

@ -156,7 +156,7 @@ async fn delete_document_by_filter() {
index.wait_task(1).await;
let (response, code) =
index.delete_document_by_filter(json!({ "filter": "color = blue"})).await;
// snapshot!(code, @"202 Accepted");
snapshot!(code, @"202 Accepted");
snapshot!(json_string!(response, { ".enqueuedAt" => "[date]" }), @r###"
{
"taskUid": 2,
@ -247,14 +247,11 @@ async fn delete_document_by_filter() {
{
"id": 0,
"color": "red"
},
{
"id": 3
}
],
"offset": 0,
"limit": 20,
"total": 2
"total": 1
}
"###);
}