test error delete unexisting index

This commit is contained in:
mpostma 2020-06-05 11:40:18 +02:00
parent 11e00c906f
commit 56b01ba440

View File

@ -195,6 +195,12 @@ async fn rename_index() {
async fn delete_index_and_recreate_it() { async fn delete_index_and_recreate_it() {
let mut server = common::Server::with_uid("movies"); let mut server = common::Server::with_uid("movies");
// 0 - delete unexisting index is error
let (response, status_code) = server.delete_request("/indexes/test").await;
assert_eq!(status_code, 404);
assert_eq!(&response["errorCode"], "index_not_found");
// 1 - Create a new index // 1 - Create a new index
let body = json!({ let body = json!({