mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-25 15:51:03 +00:00
Add bad_request error tests
This commit is contained in:
@ -83,10 +83,17 @@ async fn clear_all_documents_empty_index() {
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn delete_batch_unexisting_index() {
|
||||
async fn error_delete_batch_unexisting_index() {
|
||||
let server = Server::new().await;
|
||||
let (response, code) = server.index("test").delete_batch(vec![]).await;
|
||||
assert_eq!(code, 404, "{}", response);
|
||||
let expected_response = json!({
|
||||
"message": "Index test not found.",
|
||||
"code": "index_not_found",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#index_not_found"
|
||||
});
|
||||
assert_eq!(code, 404);
|
||||
assert_eq!(response, expected_response);
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
|
Reference in New Issue
Block a user